From dd45be518fff36ff92848d162ccd2f1a34c0d1d7 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Thu, 17 Nov 2011 21:26:02 +0100 Subject: [PATCH] Improve error messages, report file name. --- simgear/io/sg_binobj.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simgear/io/sg_binobj.cxx b/simgear/io/sg_binobj.cxx index 54f3b8de..a4fbc8ff 100644 --- a/simgear/io/sg_binobj.cxx +++ b/simgear/io/sg_binobj.cxx @@ -461,7 +461,7 @@ bool SGBinObject::read_bin( const string& file ) { //cout << "Total objects to read = " << nobjects << endl; if ( sgReadError() ) { - cout << "We detected an error while reading the file header" << endl; + cout << "Error while reading header of file " << file << "(.gz)" << endl; return false; } @@ -612,7 +612,7 @@ bool SGBinObject::read_bin( const string& file ) { } if ( sgReadError() ) { - cout << "We detected an error while reading object:" << i << endl; + cout << "Error while reading object:" << i << " in file " << file << "(.gz)" << endl; return false; } } @@ -621,7 +621,7 @@ bool SGBinObject::read_bin( const string& file ) { gzclose(fp); if ( sgReadError() ) { - cout << "We detected an error while reading the file." << endl; + cout << "Error while reading file " << file << "(.gz)" << endl; return false; } @@ -829,7 +829,7 @@ bool SGBinObject::write_bin_file(const SGPath& file) gzclose(fp); if ( sgWriteError() ) { - cout << "We detected an error while writing the file." << endl; + cout << "Error while writing file " << file.str() << endl; return false; }