From dfcb6799d7ec99e8cdcab344ffd92dc8c13c17b0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 18 Jun 2011 00:49:02 +0100 Subject: catch by const reference --- dtrans/source/generic/clipboardmanager.cxx | 3 +-- dtrans/source/test/test_dtrans.cxx | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'dtrans/source') diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index 5fdc78b19f4a..d6dc32226037 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -219,8 +219,7 @@ void SAL_CALL ClipboardManager::dispose() xComponent->removeEventListener(static_cast < XEventListener * > (this)); xComponent->dispose(); } - - catch(Exception e) + catch (const Exception&) { // exceptions can be safely ignored here. } diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx index 3bb0966e286d..d1a2611ca93c 100644 --- a/dtrans/source/test/test_dtrans.cxx +++ b/dtrans/source/test/test_dtrans.cxx @@ -465,13 +465,13 @@ int SAL_CALL main( int argc, const char* argv[] ) xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); TRACE( "FAILED\n" ); } - catch( NoSuchElementException e ) + catch (const NoSuchElementException&) { TRACE( "passed\n" ); } } - catch ( Exception aException ) + catch (const Exception&) { ENSURE( sal_False, "*** ERROR *** exception caught." ); } -- cgit v1.2.3