From: Florent Rougon Date: Sun, 24 Apr 2016 15:53:42 +0000 (+0200) Subject: apt.dat parser: clearer log and exception messages X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a43786f8ddbf48938d5e59ca1032123b8c25f994;p=flightgear.git apt.dat parser: clearer log and exception messages - the 'apt_dat' variable introduced here will be used in further commits; - use two spaces for indentation, as seen in most of the file. --- diff --git a/src/Airports/apt_loader.cxx b/src/Airports/apt_loader.cxx index 9e6a47588..d99e9355e 100644 --- a/src/Airports/apt_loader.cxx +++ b/src/Airports/apt_loader.cxx @@ -88,11 +88,12 @@ public: void parseAPT(const SGPath &aptdb_file) { - sg_gzifstream in( aptdb_file.str() ); + std::string apt_dat = aptdb_file.str(); + sg_gzifstream in(apt_dat); if ( !in.is_open() ) { - SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << aptdb_file ); - throw sg_io_exception("cannot open APT file", aptdb_file); + SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << apt_dat ); + throw sg_io_exception("cannot open apt.dat file", apt_dat.c_str()); } string line;