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
|
@ -92,7 +92,7 @@ SCENARIO("Config accessor functions perform as expected.", "[Config]") {
|
|||
}
|
||||
WHEN("A numeric option is set to a non-numeric value.") {
|
||||
THEN("A BadOptionTypeException exception is thown.") {
|
||||
REQUIRE_THROWS_AS(config.set_deserialize_strict("perimeter_speed", "zzzz"), BadOptionTypeException);
|
||||
REQUIRE_THROWS_AS(config.set_deserialize_strict("perimeter_speed", "zzzz"), BadOptionValueException);
|
||||
}
|
||||
THEN("The value does not change.") {
|
||||
REQUIRE(config.opt<ConfigOptionFloat>("perimeter_speed")->getFloat() == 60.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue