]> git.mxchange.org Git - flightgear.git/commitdiff
- catch sg_exception instead of sg_io_exception
authorcurt <curt>
Tue, 24 Jul 2001 23:51:36 +0000 (23:51 +0000)
committercurt <curt>
Tue, 24 Jul 2001 23:51:36 +0000 (23:51 +0000)
- use new sg_throwable::getFormattedMessage method

src/Main/fg_init.cxx
src/Main/options.cxx

index 1b301b8d8d801c688340cabe7ad9273a41e42205..5419fcd040a421a6c6c44a009cee0d98375fe68e 100644 (file)
@@ -219,11 +219,9 @@ bool fgInitConfig ( int argc, char **argv ) {
     SG_LOG(SG_INPUT, SG_INFO, "Reading global preferences");
     try {
       readProperties(props_path.str(), globals->get_props());
-    } catch (const sg_io_exception &e) {
+    } catch (const sg_exception &e) {
       string message = "Error reading global preferences: ";
-      message += e.getMessage();
-      message += "\n at ";
-      message += e.getLocation().asString();
+      message += e.getFormattedMessage();
       SG_LOG(SG_INPUT, SG_ALERT, message);
       exit(2);
     }
index e4f36c5c6c4d171e51a245d8c051c4475741d6b9..efdaf30201465bc9745469282eeb86401d397bc0 100644 (file)
@@ -883,11 +883,9 @@ parse_option (const string& arg)
         string file = arg.substr(9);
        try {
          readProperties(file, globals->get_props());
-       } catch (const sg_io_exception &e) {
+       } catch (const sg_exception &e) {
          string message = "Error loading config file: ";
-         message += e.getMessage();
-         message += "\n at ";
-         message += e.getLocation().asString();
+         message += e.getFormattedMessage();
          SG_LOG(SG_INPUT, SG_ALERT, message);
          exit(2);
        }