Kaydet (Commit) a367e9f1 authored tarafından Caolán McNamara's avatar Caolán McNamara

catch exceptions by const reference

üst d2773713
...@@ -189,9 +189,8 @@ namespace dbaui ...@@ -189,9 +189,8 @@ namespace dbaui
xRet = xComponentLoader->loadComponentFromURL( _rLinkName, ::rtl::OUString(), 0, aArguments.getPropertyValues() ); xRet = xComponentLoader->loadComponentFromURL( _rLinkName, ::rtl::OUString(), 0, aArguments.getPropertyValues() );
} }
catch(Exception& e) catch(const Exception&)
{ {
(void)e;
throw; throw;
} }
...@@ -229,7 +228,7 @@ namespace dbaui ...@@ -229,7 +228,7 @@ namespace dbaui
xWizard->trigger( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "start" ) ) ); xWizard->trigger( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "start" ) ) );
::comphelper::disposeComponent( xWizard ); ::comphelper::disposeComponent( xWizard );
} }
catch(const Exception& e) catch(const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -334,7 +333,7 @@ namespace dbaui ...@@ -334,7 +333,7 @@ namespace dbaui
xNewDocument.set( xContent->execute( aCommand, xContent->createCommandIdentifier(), NULL ), UNO_QUERY ); xNewDocument.set( xContent->execute( aCommand, xContent->createCommandIdentifier(), NULL ), UNO_QUERY );
} }
} }
catch(const Exception& ) catch(const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
...@@ -362,7 +361,7 @@ namespace dbaui ...@@ -362,7 +361,7 @@ namespace dbaui
} }
return xRet; return xRet;
} }
catch (com::sun::star::io::WrongFormatException &e) catch(const com::sun::star::io::WrongFormatException &e)
{ {
com::sun::star::sdbc::SQLException aSQLException; com::sun::star::sdbc::SQLException aSQLException;
aSQLException.Message = e.Message; aSQLException.Message = e.Message;
...@@ -378,7 +377,7 @@ namespace dbaui ...@@ -378,7 +377,7 @@ namespace dbaui
sMessage.SearchAndReplaceAscii("$file$",_rLinkName); sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
aInfo.prepend(sMessage); aInfo.prepend(sMessage);
} }
catch(Exception& e) catch(const Exception& e)
{ {
Any aAny = ::cppu::getCaughtException(); Any aAny = ::cppu::getCaughtException();
com::sun::star::sdbc::SQLException a; com::sun::star::sdbc::SQLException a;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment