Fix handling of derived RageExceptions.

Log unhandled exceptions.
This commit is contained in:
Glenn Maynard
2003-08-13 17:45:47 +00:00
parent 20f073fbcd
commit 5d81bdb8c3
+8 -1
View File
@@ -560,7 +560,7 @@ int main(int argc, char* argv[])
#ifndef DEBUG
}
catch( RageException e )
catch( const RageException &e )
{
g_sErrorString = e.what();
@@ -588,6 +588,13 @@ int main(int argc, char* argv[])
}
}
#endif
} catch( const exception &e ) {
if( LOG )
LOG->Warn("Unhandled exception: \"%s\"", e.what() );
/* Re-throw, so we get an unhandled exception crash and get a backtrace (at least
* in Windows). */
throw;
}
#endif