diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-24 09:29:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-24 11:48:39 +0200 |
commit | 2f9d53df89614955215a630beb0966f0c4a663c2 (patch) | |
tree | 31600e6d12542e4c04b2e12e16f5c54c708d7d0f /comphelper | |
parent | cdf176c9749ed1a0c2faceeae0c73bf735c5b00b (diff) |
remove unused exc_handling enum
Change-Id: I5e2e084114c8b0eedd0f2cd8327d6c6d68742462
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/scopeguard.cxx | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx index f159b293ed3b..6eeb7c8e166c 100644 --- a/comphelper/source/misc/scopeguard.cxx +++ b/comphelper/source/misc/scopeguard.cxx @@ -26,27 +26,18 @@ namespace comphelper { ScopeGuard::~ScopeGuard() { - if (m_func) - { - if (m_excHandling == IGNORE_EXCEPTIONS) - { - try { - m_func(); - } - catch (css::uno::Exception & exc) { - (void) exc; // avoid warning about unused variable - OSL_FAIL( - OUStringToOString( "UNO exception occurred: " + - exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); - } - catch (...) { - OSL_FAIL( "unknown exception occurred!" ); - } - } - else - { - m_func(); - } + if (!m_func) + return; + try { + m_func(); + } + catch (css::uno::Exception & exc) { + (void) exc; // avoid warning about unused variable + OSL_FAIL( OUStringToOString( "UNO exception occurred: " + exc.Message, + RTL_TEXTENCODING_UTF8 ).getStr() ); + } + catch (...) { + OSL_FAIL( "unknown exception occurred!" ); } } |