catch by const reference

This commit is contained in:
Caolán McNamara
2011-06-18 00:49:02 +01:00
parent 86e420075c
commit dfcb6799d7
2 changed files with 3 additions and 4 deletions

View File

@@ -219,8 +219,7 @@ void SAL_CALL ClipboardManager::dispose()
xComponent->removeEventListener(static_cast < XEventListener * > (this)); xComponent->removeEventListener(static_cast < XEventListener * > (this));
xComponent->dispose(); xComponent->dispose();
} }
catch (const Exception&)
catch(Exception e)
{ {
// exceptions can be safely ignored here. // exceptions can be safely ignored here.
} }

View File

@@ -465,13 +465,13 @@ int SAL_CALL main( int argc, const char* argv[] )
xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
TRACE( "FAILED\n" ); TRACE( "FAILED\n" );
} }
catch( NoSuchElementException e ) catch (const NoSuchElementException&)
{ {
TRACE( "passed\n" ); TRACE( "passed\n" );
} }
} }
catch ( Exception aException ) catch (const Exception&)
{ {
ENSURE( sal_False, "*** ERROR *** exception caught." ); ENSURE( sal_False, "*** ERROR *** exception caught." );
} }