Improve the reporting of specification errors

This commit is contained in:
Alexander Bock
2023-02-13 22:16:23 +01:00
parent b38db8a050
commit c242104baf
12 changed files with 36 additions and 46 deletions
+1 -7
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
}