diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index e02d54ee8..c56e0c5a4 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -237,7 +237,7 @@ void DynamicObject::DumpObjects(const String& filename, int attributeTypes) fp.open(tempFilename.CStr(), std::ios_base::out); if (!fp) - BOOST_THROW_EXCEPTION(std::runtime_error("Could not open '" + filename + "' file")); + BOOST_THROW_EXCEPTION(std::runtime_error("Could not open '" + tempFilename + "' file")); StdioStream::Ptr sfp = make_shared(&fp, false);