mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
Improved error reporting when importing various configuration files:
1) Slic3r::RuntimeError was replaced with ConfigurationError, all exceptions thrown by the configuration layer are derived from ConfigurationError. 2) When parsing configuration files, ConfigurationError is catched and rethrown extended with the file name being parsed.
This commit is contained in:
parent
4cbe7a9545
commit
965c2f2c55
5 changed files with 181 additions and 113 deletions
|
@ -2337,6 +2337,10 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||
if (obj->name.empty())
|
||||
obj->name = fs::path(obj->input_file).filename().string();
|
||||
}
|
||||
} catch (const ConfigurationError &e) {
|
||||
std::string message = GUI::format(_L("Failed loading file \"%1%\" due to an invalid configuration."), filename.string()) + "\n\n" + e.what();
|
||||
GUI::show_error(q, message);
|
||||
continue;
|
||||
} catch (const std::exception &e) {
|
||||
GUI::show_error(q, e.what());
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue