mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 12:42:34 +01:00
Made exception handler optional.
This commit is contained in:
@@ -76,6 +76,9 @@ namespace bx
|
||||
///
|
||||
void debugOutputCallstack(uint32_t _skip);
|
||||
|
||||
/// Install BX exception handler.
|
||||
void installExceptionHandler();
|
||||
|
||||
} // namespace bx
|
||||
|
||||
#endif // BX_DEBUG_H_HEADER_GUARD
|
||||
|
||||
@@ -552,6 +552,16 @@ namespace bx
|
||||
|
||||
#endif // BX_CONFIG_EXCEPTION_HANDLING_*
|
||||
|
||||
ExceptionHandler s_exceptionHandler;
|
||||
void installExceptionHandler()
|
||||
{
|
||||
static bool s_installed = false;
|
||||
|
||||
if (!s_installed)
|
||||
{
|
||||
s_installed = true;
|
||||
|
||||
static ExceptionHandler s_exceptionHandler;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace bx
|
||||
|
||||
Reference in New Issue
Block a user