]> git.mxchange.org Git - flightgear.git/commitdiff
Clarified the error message: recall the name of the file that has not been found.
authorbcoconni <bcoconni@users.sourceforge.net>
Tue, 14 Jul 2015 13:59:45 +0000 (15:59 +0200)
committerbcoconni <bcoconni@users.sourceforge.net>
Tue, 14 Jul 2015 13:59:45 +0000 (15:59 +0200)
src/FDM/JSBSim/input_output/FGModelLoader.cpp

index 7c84dc7f9e0cc20620c0b9aa74e2576b9fc507ab..45378efc41d08c005bbb1eee37c4844a46ae2536 100644 (file)
@@ -46,7 +46,7 @@ using namespace std;
 
 namespace JSBSim {
 
-IDENT(IdSrc, "$Id: FGModelLoader.cpp,v 1.1 2014/06/09 11:52:06 bcoconni Exp $");
+IDENT(IdSrc, "$Id: FGModelLoader.cpp,v 1.3 2015/07/12 12:41:55 bcoconni Exp $");
 IDENT(IdHdr, ID_MODELLOADER);
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -64,10 +64,11 @@ Element_ptr FGModelLoader::Open(Element *el)
 
     try {
       file = model->FindFullPathName(fname);
+      if (file.empty()) throw string("File does not exist.");
     }
     catch(string& e) {
       cerr << endl << el->ReadFrom()
-           << "Could not open file: " << e << endl;
+           << "Could not open file: " << fname << endl << e << endl;
       return NULL;
     }