summaryrefslogtreecommitdiff
path: root/vcl/source/app/svmain.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-11 16:10:39 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-13 06:29:34 +0000
commit7d902940508decad933c19bc97e5409873ab5189 (patch)
tree18fd3ed9420a4127db377bcd2201a3627ef72135 /vcl/source/app/svmain.cxx
parentc2f912b51efa458ba9bd1601a8676ab119aca1bd (diff)
convert EXCEPTION_ to scoped enum
- simplify VCLExceptionSignal_impl - drop "minor" part of error code, nobody passes it in, and nobody checks it - rename Display to UserInterface, to prevent -Werror=shadow Change-Id: I503fd8a50ded30d59c30fb388796f6b1a0c058de Reviewed-on: https://gerrit.libreoffice.org/24892 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/app/svmain.cxx')
-rw-r--r--vcl/source/app/svmain.cxx74
1 files changed, 36 insertions, 38 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 39e62315c24b..2b315b2606d0 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -102,52 +102,50 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo
static volatile bool bIn = false;
// if we crash again, bail out immediately
- if ( !bIn )
- {
- sal_uInt16 nVCLException = 0;
+ if ( bIn )
+ return osl_Signal_ActCallNextHdl;
- // UAE
- if ( (pInfo->Signal == osl_Signal_AccessViolation) ||
- (pInfo->Signal == osl_Signal_IntegerDivideByZero) ||
- (pInfo->Signal == osl_Signal_FloatDivideByZero) ||
- (pInfo->Signal == osl_Signal_DebugBreak) )
- {
- nVCLException = EXCEPTION_SYSTEM;
+ ExceptionCategory nVCLException = ExceptionCategory::NONE;
+
+ // UAE
+ if ( (pInfo->Signal == osl_Signal_AccessViolation) ||
+ (pInfo->Signal == osl_Signal_IntegerDivideByZero) ||
+ (pInfo->Signal == osl_Signal_FloatDivideByZero) ||
+ (pInfo->Signal == osl_Signal_DebugBreak) )
+ {
+ nVCLException = ExceptionCategory::System;
#if HAVE_FEATURE_OPENGL
- if (OpenGLZone::isInZone())
- OpenGLZone::hardDisable();
+ if (OpenGLZone::isInZone())
+ OpenGLZone::hardDisable();
#endif
- }
+ }
+
+ // RC
+ if ((pInfo->Signal == osl_Signal_User) &&
+ (pInfo->UserSignal == OSL_SIGNAL_USER_RESOURCEFAILURE) )
+ nVCLException = ExceptionCategory::ResourceNotLoaded;
- // RC
- if ((pInfo->Signal == osl_Signal_User) &&
- (pInfo->UserSignal == OSL_SIGNAL_USER_RESOURCEFAILURE) )
- nVCLException = EXCEPTION_RESOURCENOTLOADED;
+ // DISPLAY-Unix
+ if ((pInfo->Signal == osl_Signal_User) &&
+ (pInfo->UserSignal == OSL_SIGNAL_USER_X11SUBSYSTEMERROR) )
+ nVCLException = ExceptionCategory::UserInterface;
+
+ if ( nVCLException != ExceptionCategory::NONE )
+ {
+ bIn = true;
- // DISPLAY-Unix
- if ((pInfo->Signal == osl_Signal_User) &&
- (pInfo->UserSignal == OSL_SIGNAL_USER_X11SUBSYSTEMERROR) )
- nVCLException = EXCEPTION_DISPLAY;
+ SolarMutexGuard aLock;
- if ( nVCLException )
+ // do not stop timer because otherwise the UAE-Box will not be painted as well
+ ImplSVData* pSVData = ImplGetSVData();
+ if ( pSVData->mpApp )
{
- bIn = true;
-
- SolarMutexGuard aLock;
-
- // do not stop timer because otherwise the UAE-Box will not be painted as well
- ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->mpApp )
- {
- SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
- Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
- pSVData->mpApp->Exception( nVCLException );
- Application::SetSystemWindowMode( nOldMode );
- }
- bIn = false;
-
- return osl_Signal_ActCallNextHdl;
+ SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
+ Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
+ pSVData->mpApp->Exception( nVCLException );
+ Application::SetSystemWindowMode( nOldMode );
}
+ bIn = false;
}
return osl_Signal_ActCallNextHdl;