]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/apt_loader.cxx
Document that property write-protection is not a security measure
[flightgear.git] / src / Airports / apt_loader.cxx
index e41db5a590b4845dcedf2976df60fd1601bbb872..f2f3b712076fcbc9e013fbd560671165d5cbf5a0 100644 (file)
@@ -90,7 +90,7 @@ public:
 
     if ( !in.is_open() ) {
         SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << aptdb_file );
-        exit(-1);
+        throw sg_io_exception("cannot open APT file", aptdb_file);
     }
 
     string line;
@@ -186,7 +186,7 @@ public:
       } else {
           SG_LOG( SG_GENERAL, SG_ALERT, 
                   "Unknown line(#" << line_num << ") in apt.dat file: " << line );
-          exit( -1 );
+          throw sg_format_exception("malformed line in apt.dat:", line);
       }
     }
 
@@ -366,7 +366,7 @@ private:
 
     const string& rwy_no_1(token[8]);
     const string& rwy_no_2(token[17]);
-    if ( rwy_no_1.size() == 0 || rwy_no_2.size() == 0 )
+    if ( rwy_no_1.empty() || rwy_no_2.empty() )
         return;
 
     double displ_thresh1 = atof( token[11].c_str() );