From a43786f8ddbf48938d5e59ca1032123b8c25f994 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Sun, 24 Apr 2016 17:53:42 +0200 Subject: [PATCH] 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. --- src/Airports/apt_loader.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.39.5