]> git.mxchange.org Git - flightgear.git/commitdiff
Not finding a depricated config file shouldn't be a fatal error.
authorcurt <curt>
Thu, 30 Oct 2008 18:33:28 +0000 (18:33 +0000)
committercurt <curt>
Thu, 30 Oct 2008 18:33:28 +0000 (18:33 +0000)
src/Network/ATC-Main.cxx

index 8e1b81cda401e517552cfb4b8345c6fe28d78f2a..ed5ac8d9878de4a6cb1e47c3ee7cd2e1b7f78437 100644 (file)
@@ -95,7 +95,15 @@ void FGATCMain::init_config() {
     if ( envp != NULL ) {
         SGPath atcsim_config( envp );
         atcsim_config.append( ".fgfs-atc610x.xml" );
-        readProperties( atcsim_config.str(), globals->get_props() );
+       try {
+         SG_LOG(SG_GENERAL, SG_ALERT,
+                "Warning: loading depricated config file: " <<
+                atcsim_config.str() );
+         readProperties( atcsim_config.str(), globals->get_props() );
+       } catch (const sg_exception &e) {
+         // fail silently, this is an old style config file I want to continue
+         // to support if it exists.
+       }
     }
 #endif
 }