diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/map_extractor/System.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 72af10067b4..ab9774a3038 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -1185,14 +1185,22 @@ void ExtractDBFilesClient(int l) bool OpenCascStorage() { - boost::filesystem::path const storage_dir (boost::filesystem::canonical (input_path) / "Data"); - if (!CascOpenStorage(storage_dir.string().c_str(), 0, &CascStorage)) + try { - printf("error opening casc storage '%s': %s\n", storage_dir.string().c_str(), HumanReadableCASCError(GetLastError())); + boost::filesystem::path const storage_dir(boost::filesystem::canonical(input_path) / "Data"); + if (!CascOpenStorage(storage_dir.string().c_str(), 0, &CascStorage)) + { + printf("error opening casc storage '%s': %s\n", storage_dir.string().c_str(), HumanReadableCASCError(GetLastError())); + return false; + } + printf("opened casc storage '%s'\n", storage_dir.string().c_str()); + return true; + } + catch (boost::filesystem::filesystem_error& error) + { + printf("error opening casc storage : %s\n", error.what()); return false; } - printf("opened casc storage '%s'\n", storage_dir.string().c_str()); - return true; } int main(int argc, char * arg[]) |