From 5d81bdb8c3f4096ca3f5eff19b9599c8ecf857f6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 13 Aug 2003 17:45:47 +0000 Subject: [PATCH] Fix handling of derived RageExceptions. Log unhandled exceptions. --- stepmania/src/StepMania.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index d5741644b4..bc58bb18f9 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -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