]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/electrical.cxx
TACAN: fix distance calculations and some other problems.
[flightgear.git] / src / Systems / electrical.cxx
index 16de41f581e366d208d317d4d8c3cf2af3fe7069..ebe684cc985975b2eea5b9acda5ba002d0a50c45 100644 (file)
@@ -24,6 +24,7 @@
 #  include <config.h>
 #endif
 
+#include <cstdlib>
 #include <cstring>
 
 #include <simgear/structure/exception.hxx>
@@ -385,13 +386,7 @@ void FGElectricalSystem::init () {
             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,
@@ -637,7 +632,7 @@ float FGElectricalSystem::propagate( FGElectricalComponent *node, double dt,
         }
         // cout << s << "  input_volts = " << volts << endl;
     } else {
-        SG_LOG( SG_SYSTEMS, SG_ALERT, "unkown node type" );
+        SG_LOG( SG_SYSTEMS, SG_ALERT, "unknown node type" );
     }
 
     int i;