mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-01 08:19:51 -05:00
Improve the reporting of specification errors
This commit is contained in:
@@ -99,13 +99,7 @@ Layer* LayerManager::addLayer(layers::Group::ID id, const ghoul::Dictionary& lay
|
||||
return _layerGroups[static_cast<size_t>(id)]->addLayer(layerDict);
|
||||
}
|
||||
catch (const documentation::SpecificationError& e) {
|
||||
LERRORC(e.component, e.message);
|
||||
for (const documentation::TestResult::Offense& o : e.result.offenses) {
|
||||
LERRORC(o.offender, ghoul::to_string(o.reason));
|
||||
}
|
||||
for (const documentation::TestResult::Warning& w : e.result.warnings) {
|
||||
LWARNINGC(w.offender, ghoul::to_string(w.reason));
|
||||
}
|
||||
logError(e);
|
||||
return nullptr;
|
||||
}
|
||||
catch (const ghoul::RuntimeError& e) {
|
||||
|
||||
@@ -69,8 +69,8 @@ void StateMachineModule::initializeStateMachine(const ghoul::Dictionary& states,
|
||||
));
|
||||
}
|
||||
catch (const documentation::SpecificationError& e) {
|
||||
LERROR(ghoul::to_string(e.result));
|
||||
LERROR(fmt::format("Error loading state machine: {}", e.what()));
|
||||
logError(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user