From 8597aa1bd69d970495cd936deaa4ffdb1cda61a2 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 20 Mar 2006 06:53:17 +0000 Subject: [PATCH] Old commit. --- stepmania/src/RageException.cpp | 6 ++++++ stepmania/src/RageException.h | 1 + 2 files changed, 7 insertions(+) diff --git a/stepmania/src/RageException.cpp b/stepmania/src/RageException.cpp index 794497f7a2..c38b40869f 100644 --- a/stepmania/src/RageException.cpp +++ b/stepmania/src/RageException.cpp @@ -15,6 +15,12 @@ void RageException::SetCleanupHandler( void (*pHandler)(const RString &sError) ) g_CleanupHandler = pHandler; } +void RageException::CallCleanupHandler( const RString &sError ) +{ + if( g_CleanupHandler ) + g_CleanupHandler( sError ); +} + /* This is no longer actually implemented by throwing an exception, but it acts * the same way to code in practice. */ void RageException::Throw( const char *sFmt, ... ) diff --git a/stepmania/src/RageException.h b/stepmania/src/RageException.h index f0ec665e7d..e205250c51 100644 --- a/stepmania/src/RageException.h +++ b/stepmania/src/RageException.h @@ -7,6 +7,7 @@ namespace RageException { void NORETURN Throw(const char *fmt, ...); void SetCleanupHandler( void (*pHandler)(const RString &sError) ); + void CallCleanupHandler( const RString &sError ); }; #endif