- priority: 5 --> 3
In v5.0 I added a routine to LoadMap and LoadMapEx
that throws and exception if the map file is not loaded
properly:
// create the file stream object and open the file
ifstream filein(c_filename);
// check to ensure file was opened successfully
if (filein.bad())
{
// compose error message
static char error[40];
memset(error, 0, sizeof error);
strcat(error, "could not load ");
strcat(error, c_filename);
throw Error(error, "CTileMngr.cpp", __LINE__);
}
However it seems something about it isn't right. To test
it out yourself, remove the map file for the test app
you're using from it's directory and place it elswhere.
Now run the app. If you are tunning XP, it will tell you
there has been an error and it will have to close. Other
OSes may handle this differently, but in short, the app
will crash and burn. Now, if you open stderr.txt in the
execution directory there will be no line saying that a
map file could not be loaded. The error is not caught.
Execution never reaches the decision statement after
the file is opened.
I think this may be a result of some parameter not
passed when the file object is created that allows for
error checking if the file is not opened, but I'm not
entirely sure.