Kaydet (Commit) 5e3a4ecb authored tarafından Takeshi Abe's avatar Takeshi Abe

catch by const reference

Change-Id: I80a26483c4ecd099a1cfe76bdac1e97b947ef104
üst 9902f0ee
...@@ -283,7 +283,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec ...@@ -283,7 +283,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
{ {
showError( SQLExceptionInfo( ::cppu::getCaughtException() ) ); showError( SQLExceptionInfo( ::cppu::getCaughtException() ) );
} }
catch(WrappedTargetException& e) catch(const WrappedTargetException& e)
{ {
SQLException aSql; SQLException aSql;
if ( e.TargetException >>= aSql ) if ( e.TargetException >>= aSql )
......
...@@ -386,9 +386,9 @@ void ODbDataSourceAdministrationHelper::clearPassword() ...@@ -386,9 +386,9 @@ void ODbDataSourceAdministrationHelper::clearPassword()
aRet.first = getDriver()->connect(getConnectionURL(), aConnectionParams); aRet.first = getDriver()->connect(getConnectionURL(), aConnectionParams);
aRet.second = sal_True; aRet.second = sal_True;
} }
catch (SQLContext& e) { aErrorInfo = SQLExceptionInfo(e); } catch (const SQLContext& e) { aErrorInfo = SQLExceptionInfo(e); }
catch (SQLWarning& e) { aErrorInfo = SQLExceptionInfo(e); } catch (const SQLWarning& e) { aErrorInfo = SQLExceptionInfo(e); }
catch (SQLException& e) { aErrorInfo = SQLExceptionInfo(e); } catch (const SQLException& e) { aErrorInfo = SQLExceptionInfo(e); }
showError(aErrorInfo,m_pParent,getORB()); showError(aErrorInfo,m_pParent,getORB());
} }
...@@ -415,7 +415,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O ...@@ -415,7 +415,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O
xDriverManager = Reference< XDriverAccess >(getORB()->createInstance(SERVICE_SDBC_CONNECTIONPOOL), UNO_QUERY); xDriverManager = Reference< XDriverAccess >(getORB()->createInstance(SERVICE_SDBC_CONNECTIONPOOL), UNO_QUERY);
OSL_ENSURE(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!"); OSL_ENSURE(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!");
} }
catch (Exception& e) catch (const Exception& e)
{ {
// wrap the exception into an SQLException // wrap the exception into an SQLException
SQLException aSQLWrapper(e.Message, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any()); SQLException aSQLWrapper(e.Message, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any());
......
...@@ -277,7 +277,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) ...@@ -277,7 +277,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
} }
FillUserNames(); FillUserNames();
} }
catch(SQLException& e) catch(const SQLException& e)
{ {
::dbaui::showError(::dbtools::SQLExceptionInfo(e),this,m_xORB); ::dbaui::showError(::dbtools::SQLExceptionInfo(e),this,m_xORB);
return 0; return 0;
...@@ -340,7 +340,7 @@ void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) ...@@ -340,7 +340,7 @@ void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
} }
FillUserNames(); FillUserNames();
} }
catch(SQLException& e) catch(const SQLException& e)
{ {
::dbaui::showError(::dbtools::SQLExceptionInfo(e),this,m_xORB); ::dbaui::showError(::dbtools::SQLExceptionInfo(e),this,m_xORB);
} }
......
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