diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-11 16:10:39 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-13 06:29:34 +0000 |
commit | 7d902940508decad933c19bc97e5409873ab5189 (patch) | |
tree | 18fd3ed9420a4127db377bcd2201a3627ef72135 /desktop | |
parent | c2f912b51efa458ba9bd1601a8676ab119aca1bd (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 'desktop')
-rw-r--r-- | desktop/inc/app.hxx | 2 | ||||
-rw-r--r-- | desktop/source/app/app.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 3bcc098a81c7..1905cf0c1d7c 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -76,7 +76,7 @@ class Desktop : public Application virtual void InitFinished() override; virtual void DeInit() override; virtual bool QueryExit() override; - virtual void Exception(sal_uInt16 nError) override; + virtual void Exception(ExceptionCategory nCategory) override; virtual void OverrideSystemSettings( AllSettings& rSettings ) override; virtual void AppEvent( const ApplicationEvent& rAppEvent ) override; diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 133c4c5bef17..847381c23287 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1223,7 +1223,7 @@ void restartOnMac(bool passArguments) { } -void Desktop::Exception(sal_uInt16 nError) +void Desktop::Exception(ExceptionCategory nCategory) { // protect against recursive calls static bool bInException = false; @@ -1244,7 +1244,7 @@ void Desktop::Exception(sal_uInt16 nError) bool bAllowRecoveryAndSessionManagement = ( ( !rArgs.IsNoRestore() ) && // some use cases of office must work without recovery ( !rArgs.IsHeadless() ) && - (( nError & EXCEPTION_MAJORTYPE ) != EXCEPTION_DISPLAY ) && // recovery can't work without UI ... but UI layer seems to be the reason for this crash + ( nCategory != ExceptionCategory::UserInterface ) && // recovery can't work without UI ... but UI layer seems to be the reason for this crash ( Application::IsInExecute() ) // crashes during startup and shutdown should be ignored (they indicates a corrupt installation ...) ); if ( bAllowRecoveryAndSessionManagement ) @@ -1252,9 +1252,9 @@ void Desktop::Exception(sal_uInt16 nError) FlushConfiguration(); - switch( nError & EXCEPTION_MAJORTYPE ) + switch( nCategory ) { - case EXCEPTION_RESOURCENOTLOADED: + case ExceptionCategory::ResourceNotLoaded: { OUString aResExceptionString; Application::Abort( aResExceptionString ); |