diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 3abcde08b5..a30293128e 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -2401,8 +2401,8 @@ private: Base::FileInfo tmp(sourcename); if (tmp.renameFile(targetname.c_str()) == false) { - Base::Console().Warning("Cannot rename file from '%s' to '%s'\n", - sourcename.c_str(), targetname.c_str()); + throw Base::FileException( + "Cannot rename tmp save file to project file", targetname); } } void applyTimeStamp(const std::string& sourcename, const std::string& targetname) { @@ -2534,9 +2534,8 @@ private: Base::FileInfo tmp(sourcename); if (tmp.renameFile(targetname.c_str()) == false) { - Base::Console().Error("Save interrupted: Cannot rename file from '%s' to '%s'\n", - sourcename.c_str(), targetname.c_str()); - //throw Base::FileException("Save interrupted: Cannot rename temporary file to project file", tmp); + throw Base::FileException( + "Save interrupted: Cannot rename temporary file to project file", tmp); } if (numberOfFiles <= 0) {