Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-08-20 17:19:30 +0300
committerbubnikv <bubnikv@gmail.com>2019-08-20 17:19:30 +0300
commitfd3fe75d1ca4ddf1a36eb89d7210a4ec0e8f4afa (patch)
tree9a7fb58437c01ad360a87b21ec0bd7d74300f732 /src/slic3r/GUI/AppConfig.cpp
parenta83da0f72cda17120cff27a0ed569d99d8e3157d (diff)
Reworked the rename_file() function on Windows to work reliably and
atomically. The code was taken from the llvm project, it is complex and hopefully it covers all the Windows file system quirks. Vojtech has highest hopes, that this will fix the various PrusaSlicer.ini file corruptions. Enabled the locales switching and error handling on Linux as well, where now the missing locales are reported and running the locale-gen tool is recommended.
Diffstat (limited to 'src/slic3r/GUI/AppConfig.cpp')
-rw-r--r--src/slic3r/GUI/AppConfig.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/slic3r/GUI/AppConfig.cpp b/src/slic3r/GUI/AppConfig.cpp
index 7ca8c3e5e..96213447c 100644
--- a/src/slic3r/GUI/AppConfig.cpp
+++ b/src/slic3r/GUI/AppConfig.cpp
@@ -98,9 +98,10 @@ void AppConfig::load()
pt::read_ini(ifs, tree);
} catch (pt::ptree_error& ex) {
// Error while parsing config file. We'll customize the error message and rethrow to be displayed.
- throw std::runtime_error(wxString::Format(_(L("Error parsing config file, it is probably corrupted. "
- "Try to manualy delete the file. Your user profiles will not be affected.\n\n%s\n\n%s")),
- AppConfig::config_path(), ex.what()).ToStdString());
+ throw std::runtime_error(
+ _utf8(L("Error parsing PrusaSlicer config file, it is probably corrupted. "
+ "Try to manualy delete the file to recover from the error. Your user profiles will not be affected.")) +
+ "\n\n" + AppConfig::config_path() + "\n\n" + ex.what());
}
// 2) Parse the property_tree, extract the sections and key / value pairs.