X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fio%2FWorldSave.cpp;fp=src%2Fio%2FWorldSave.cpp;h=529d0d91a5784da2f1cf2cea55ae62a1fc87b75c;hb=c0a5ece0f6bacea1b85157a908d710070fb0affd;hp=ce7c71d35ea55c19d85b85b56b0a3f7d8e83db01;hpb=307482574d3acac09e38263de521a1826ceec7ce;p=blank.git diff --git a/src/io/WorldSave.cpp b/src/io/WorldSave.cpp index ce7c71d..529d0d9 100644 --- a/src/io/WorldSave.cpp +++ b/src/io/WorldSave.cpp @@ -2,6 +2,7 @@ #include "filesystem.hpp" #include "TokenStreamReader.hpp" +#include "../app/error.hpp" #include #include @@ -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("\\/"));