mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-20 03:00:03 -06:00
Improve SpecificationError reporting
Fix spelling error in ModuleEngine
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <openspace/openspace.h>
|
||||
|
||||
#include <openspace/documentation/core_registration.h>
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/documentation/documentationengine.h>
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
#include <openspace/engine/downloadmanager.h>
|
||||
@@ -291,6 +292,17 @@ bool OpenSpaceEngine::create(int argc, char** argv,
|
||||
try {
|
||||
_engine->configurationManager().loadFromFile(configurationFilePath);
|
||||
}
|
||||
catch (const documentation::SpecificationError& e) {
|
||||
LFATAL("Loading of configuration file '" << configurationFilePath << "' failed");
|
||||
for (const documentation::TestResult::Offense& o : e.result.offenses) {
|
||||
LERRORC(o.offender, std::to_string(o.reason));
|
||||
}
|
||||
for (const documentation::TestResult::Warning& w : e.result.warnings) {
|
||||
LWARNINGC(w.offender, std::to_string(w.reason));
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
catch (const ghoul::RuntimeError& e) {
|
||||
LFATAL("Loading of configuration file '" << configurationFilePath << "' failed");
|
||||
LFATALC(e.component, e.message);
|
||||
|
||||
Reference in New Issue
Block a user