forked from mia/Aegisub
* Add a new define WITH_EXCEPTIONS to allow exception handling to be forced on when in debug mode.
* Add --enable-debug-exceptions to set WITH_EXCEPTIONS. * Fix precompiled header msg using AC_RESULT. (forgot this in the original patch) Originally committed to SVN as r3451.
This commit is contained in:
parent
1af100f284
commit
aef7375ddb
3 changed files with 19 additions and 4 deletions
|
@ -864,6 +864,11 @@ fi
|
|||
|
||||
AC_MSG_CHECKING([whether to use precompiled headers])
|
||||
AC_ARG_ENABLE(gcc-prec, [ --enable-gcc-prec enable GCC precompiled headers (default=no)])
|
||||
if test "$enable_gcc_prec" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AM_CONDITIONAL([PRECOMPILED_HEADER], [test "$enable_gcc_prec" = "yes"])
|
||||
|
||||
|
||||
|
@ -903,6 +908,17 @@ fi
|
|||
AC_SUBST(PACKAGE_DEBUG)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether to use exception handling in debug mode])
|
||||
AC_ARG_ENABLE(debug-exceptions, [ --enable-debug-exceptions
|
||||
enable exception handling in debug mode (default=no)])
|
||||
if test "$enable_debug_exceptions" = "yes"; then
|
||||
AC_DEFINE(WITH_EXCEPTIONS, 1, [Enable exception handling in debug mode. (--enable-debug) This is always enabled when debug mode is off.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
|
||||
###########
|
||||
# Profiling
|
||||
###########
|
||||
|
|
|
@ -161,7 +161,7 @@ bool AegisubApp::OnInit() {
|
|||
#endif
|
||||
|
||||
// Crash handling
|
||||
#ifndef _DEBUG
|
||||
#if !defined(_DEBUG) || defined(WITH_EXCEPTIONS)
|
||||
StartupLog(_T("Install exception handler"));
|
||||
wxHandleFatalExceptions(true);
|
||||
#endif
|
||||
|
@ -278,8 +278,7 @@ int AegisubApp::OnExit() {
|
|||
}
|
||||
|
||||
|
||||
#ifndef _DEBUG
|
||||
|
||||
#if !defined(_DEBUG) || defined(WITH_EXCEPTIONS)
|
||||
/// DOCME
|
||||
const static wxChar unhandled_exception_message[] = _T("Oops, Aegisub has crashed!\n\nI have tried to emergency-save a copy of your file, and a crash log file has been generated.\n\nYou can find the emergency-saved file in:\n%s\n\nIf you submit the crash log to the Aegisub team, we will investigate the problem and attempt to fix it. You can find the crashlog in:\n%s\n\nAegisub will now close.");
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ public:
|
|||
virtual void MacOpenFile(const wxString &filename);
|
||||
#endif
|
||||
|
||||
#ifndef _DEBUG
|
||||
#if !defined(_DEBUG) || defined(WITH_EXCEPTIONS)
|
||||
void OnUnhandledException();
|
||||
void OnFatalException();
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue