diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-15 13:51:29 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-15 13:52:23 +0900 |
commit | 0f44079ce20ece1931c40f62584013ac6d1668e4 (patch) | |
tree | e18d86d4feac4d33f81f03eddf12d53c4391eba9 /io/source/stm | |
parent | 535e37abdb43cf41990fcbd0ef85315b2413c4e3 (diff) |
catch exception by constant reference
Diffstat (limited to 'io/source/stm')
-rw-r--r-- | io/source/stm/opump.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx index 1ea93a036174..409fe59869a4 100644 --- a/io/source/stm/opump.cxx +++ b/io/source/stm/opump.cxx @@ -144,7 +144,7 @@ void Pump::fireError( const Any & exception ) { static_cast< XStreamListener * > ( iter.next() )->error( exception ); } - catch ( RuntimeException &e ) + catch ( const RuntimeException &e ) { OString sMessage = OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ); OSL_ENSURE( !"com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners", sMessage.getStr() ); @@ -173,7 +173,7 @@ void Pump::fireClose() { static_cast< XStreamListener * > ( iter.next() )->closed( ); } - catch ( RuntimeException &e ) + catch ( const RuntimeException &e ) { OString sMessage = OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ); OSL_ENSURE( !"com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners", sMessage.getStr() ); @@ -191,7 +191,7 @@ void Pump::fireStarted() { static_cast< XStreamListener * > ( iter.next() )->started( ); } - catch ( RuntimeException &e ) + catch ( const RuntimeException &e ) { OString sMessage = OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ); OSL_ENSURE( !"com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners", sMessage.getStr() ); @@ -208,7 +208,7 @@ void Pump::fireTerminated() { static_cast< XStreamListener * > ( iter.next() )->terminated(); } - catch ( RuntimeException &e ) + catch ( const RuntimeException &e ) { OString sMessage = OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ); OSL_ENSURE( !"com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners", sMessage.getStr() ); @@ -297,15 +297,15 @@ void Pump::run() osl_yieldThread(); } } - catch ( IOException & e ) + catch ( const IOException & e ) { fireError( makeAny( e ) ); } - catch ( RuntimeException & e ) + catch ( const RuntimeException & e ) { fireError( makeAny( e ) ); } - catch ( Exception & e ) + catch ( const Exception & e ) { fireError( makeAny( e ) ); } @@ -313,7 +313,7 @@ void Pump::run() close(); fireClose(); } - catch ( com::sun::star::uno::Exception &e ) + catch ( const com::sun::star::uno::Exception &e ) { // we are the last on the stack. // this is to avoid crashing the program, when e.g. a bridge crashes |