]> git.mxchange.org Git - flightgear.git/commitdiff
- ensure that all throwables are caught
authorcurt <curt>
Tue, 24 Jul 2001 23:51:57 +0000 (23:51 +0000)
committercurt <curt>
Tue, 24 Jul 2001 23:51:57 +0000 (23:51 +0000)
- use new sg_throwable::getFormattedMessage method

src/Main/main.cxx

index 031112fce46a330a91996fc3c13254dd22450c10..8ce5fa6bcbb714918b4a74acb3149169d6519dc0 100644 (file)
@@ -1769,15 +1769,10 @@ int main ( int argc, char **argv ) {
                                // exceptions.
   try {
     mainLoop(argc, argv);
-  } catch (sg_io_exception e1) {
+  } catch (sg_throwable &t) {
     SG_LOG(SG_GENERAL, SG_ALERT,
-          "Fatal error " << e1.getMessage()
-          << " received from " << e1.getOrigin()
-          << "\n at " << e1.getLocation().asString());
-  } catch (sg_exception e) {
-    SG_LOG(SG_GENERAL, SG_ALERT,
-          "Fatal error " << e.getMessage()
-          << " received from " << e.getOrigin());
+          "Fatal error: " << t.getFormattedMessage()
+          << "\n (received from " << t.getOrigin() << ')');
     exit(1);
   }
 }