]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/electrical.cxx
Replace the NOAA METAR URL with the new, updated one
[flightgear.git] / src / Systems / electrical.cxx
index 947df0aae21df1be1bcdc2bc84d060b7ce642e92..b83984dd6cf986f0b18b21d02b1e81a718c29452 100644 (file)
@@ -375,29 +375,24 @@ void FGElectricalSystem::init () {
 
     if ( path.length() ) {
         SGPath config = globals->resolve_aircraft_path(path);
-        
+#if defined(ENABLE_DEV_WARNINGS)
         // load an obsolete xml configuration
         SG_LOG( SG_SYSTEMS, SG_WARN,
                 "Reading deprecated xml electrical system model from\n    "
                 << config.str() );
+#endif
         try {
-            readProperties( config.str(), config_props );
+            readProperties( config, config_props );
 
             if ( build(config_props) ) {
                 enabled = true;
             } else {
-                SG_LOG( SG_SYSTEMS, SG_ALERT,
-                        "Detected a logic error in the electrical system ");
-                SG_LOG( SG_SYSTEMS, SG_ALERT,
-                        "specification file.  See earlier errors for " );
-                SG_LOG( SG_SYSTEMS, SG_ALERT,
-                        "details.");
-                exit(-1);
+                throw sg_exception("Logic error in electrical system file.");
             }        
         } catch (const sg_exception&) {
             SG_LOG( SG_SYSTEMS, SG_ALERT,
                     "Failed to load electrical system model: "
-                    << config.str() );
+                    << config );
         }
     } else {
         SG_LOG( SG_SYSTEMS, SG_INFO,