Improve errors around 2D panels
This commit is contained in:
parent
128143fd9b
commit
9fcb9206f9
1 changed files with 5 additions and 1 deletions
|
@ -641,6 +641,7 @@ readPanel (const SGPropertyNode * root, const SGPath& path)
|
||||||
{
|
{
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Reading properties for panel " <<
|
SG_LOG( SG_COCKPIT, SG_INFO, "Reading properties for panel " <<
|
||||||
root->getStringValue("name", "[Unnamed Panel]") );
|
root->getStringValue("name", "[Unnamed Panel]") );
|
||||||
|
simgear::ErrorReportContext ec("2d-panel", path.utf8Str());
|
||||||
|
|
||||||
FGPanel * panel = new FGPanel();
|
FGPanel * panel = new FGPanel();
|
||||||
panel->setWidth(root->getIntValue("w", 1024));
|
panel->setWidth(root->getIntValue("w", 1024));
|
||||||
|
@ -775,7 +776,8 @@ readPanel (const SGPropertyNode * root, const SGPath& path)
|
||||||
FGSpecialInstrument* gpsinst = new FGSpecialInstrument(gps);
|
FGSpecialInstrument* gpsinst = new FGSpecialInstrument(gps);
|
||||||
panel->addInstrument(gpsinst);
|
panel->addInstrument(gpsinst);
|
||||||
} else {
|
} else {
|
||||||
SG_LOG( SG_COCKPIT, SG_WARN, "Unknown special instrument found" );
|
simgear::reportFailure(simgear::LoadFailure::Misconfigured, simgear::ErrorCode::AircraftSystems,
|
||||||
|
"Unknown special instrument found:" + name, path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SG_LOG( SG_COCKPIT, SG_WARN, "Skipping " << node->getNameString()
|
SG_LOG( SG_COCKPIT, SG_WARN, "Skipping " << node->getNameString()
|
||||||
|
@ -828,6 +830,8 @@ fgReadPanel (istream &input)
|
||||||
FGPanel *
|
FGPanel *
|
||||||
fgReadPanel (const string &relative_path)
|
fgReadPanel (const string &relative_path)
|
||||||
{
|
{
|
||||||
|
simgear::ErrorReportContext ec("2d-panel", relative_path);
|
||||||
|
|
||||||
SGPath path = globals->resolve_aircraft_path(relative_path);
|
SGPath path = globals->resolve_aircraft_path(relative_path);
|
||||||
SGPropertyNode root;
|
SGPropertyNode root;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue