]> git.localhorst.tv Git - blank.git/blobdiff - src/io/WorldSave.cpp
move common exceptions to app/error
[blank.git] / src / io / WorldSave.cpp
index ce7c71d35ea55c19d85b85b56b0a3f7d8e83db01..529d0d91a5784da2f1cf2cea55ae62a1fc87b75c 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "filesystem.hpp"
 #include "TokenStreamReader.hpp"
+#include "../app/error.hpp"
 
 #include <cctype>
 #include <cstring>
@@ -196,7 +197,7 @@ void WorldSave::Write(Chunk &chunk) const {
                // check if it's because of a missing path component
                if (errno != ENOENT) {
                        // nope, fatal
-                       throw runtime_error(strerror(errno));
+                       throw SysError();
                }
                string dir_path(path);
                dir_path.erase(dir_path.find_last_of("\\/"));