]> git.mxchange.org Git - flightgear.git/commitdiff
- remove evil exit()
authormfranz <mfranz>
Mon, 12 Jun 2006 15:39:38 +0000 (15:39 +0000)
committermfranz <mfranz>
Mon, 12 Jun 2006 15:39:38 +0000 (15:39 +0000)
- remove "enabled". It's unused, and that's a good thing: it wasn't
  initialized.

src/Instrumentation/instrument_mgr.cxx
src/Instrumentation/instrument_mgr.hxx

index bf0bce8ed928207d222b843c7e59ffe6ec7134df..126faa19f4c3ecf369fb488d7d2640d42e39c428 100644 (file)
@@ -64,16 +64,10 @@ FGInstrumentMgr::FGInstrumentMgr ()
         try {
             readProperties( config.str(), config_props );
 
-            if ( build() ) {
-                enabled = true;
-            } else {
-                SG_LOG( SG_ALL, SG_ALERT,
-                        "Detected an internal inconsistency in the instrumentation");
-                SG_LOG( SG_ALL, SG_ALERT,
-                        " system specification file.  See earlier errors for" );
-                SG_LOG( SG_ALL, SG_ALERT,
-                        " details.");
-                exit(-1);
+            if ( !build() ) {
+                throw sg_throwable(string(
+                        "Detected an internal inconsistency in the instrumentation\n"
+                        "system specification file.  See earlier errors for details."));
             }
         } catch (const sg_exception& exc) {
             SG_LOG( SG_ALL, SG_ALERT, "Failed to load instrumentation system model: "
index 88a9c8bed656fd7a0a2dddd51103869aa9f8c524..0d0069733b7bb1bd00e91080b8799b46bd9afe99 100644 (file)
@@ -35,8 +35,6 @@ public:
 
 private:
     SGPropertyNode *config_props;
-    bool enabled;
-
 };
 
 #endif // __INSTRUMENT_MGR_HXX