mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Properly handle SpecificationErrors when initializing Modules (closes #1502)
This commit is contained in:
@@ -58,7 +58,20 @@ void ModuleEngine::initialize(
|
||||
if (it != moduleConfigurations.end()) {
|
||||
configuration = it->second;
|
||||
}
|
||||
m->initialize(configuration);
|
||||
try {
|
||||
m->initialize(configuration);
|
||||
}
|
||||
catch (const documentation::SpecificationError& e) {
|
||||
//LFATALC(e.component, e.message);
|
||||
for (const documentation::TestResult::Offense& o : e.result.offenses) {
|
||||
LERRORC(e.component, o.offender + ": " + ghoul::to_string(o.reason));
|
||||
}
|
||||
for (const documentation::TestResult::Warning& w : e.result.warnings) {
|
||||
LWARNINGC(e.component, w.offender + ": " + ghoul::to_string(w.reason));
|
||||
}
|
||||
throw;
|
||||
}
|
||||
|
||||
addPropertySubOwner(m);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user