diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-05-17 22:39:12 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-05-17 22:44:43 +0900 |
commit | 5e3a4ecb0ad61faff9fb867e9b4abd092aa115b7 (patch) | |
tree | af060998430b2ea065e8d927d273562f817816dd /dbaccess/source/ui/dlg | |
parent | 9902f0ee3d7b22e4984be7225370fb552da03838 (diff) |
catch by const reference
Change-Id: I80a26483c4ecd099a1cfe76bdac1e97b947ef104
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/UserAdmin.cxx | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index fd331c79e1f4..e7a876f1e3d8 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -386,9 +386,9 @@ void ODbDataSourceAdministrationHelper::clearPassword() aRet.first = getDriver()->connect(getConnectionURL(), aConnectionParams); aRet.second = sal_True; } - catch (SQLContext& e) { aErrorInfo = SQLExceptionInfo(e); } - catch (SQLWarning& e) { aErrorInfo = SQLExceptionInfo(e); } - catch (SQLException& e) { aErrorInfo = SQLExceptionInfo(e); } + catch (const SQLContext& e) { aErrorInfo = SQLExceptionInfo(e); } + catch (const SQLWarning& e) { aErrorInfo = SQLExceptionInfo(e); } + catch (const SQLException& e) { aErrorInfo = SQLExceptionInfo(e); } showError(aErrorInfo,m_pParent,getORB()); } @@ -415,7 +415,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O 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!"); } - catch (Exception& e) + catch (const Exception& e) { // wrap the exception into an SQLException SQLException aSQLWrapper(e.Message, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any()); diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index 17f927b06058..9fb27f8abe35 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -277,7 +277,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) } FillUserNames(); } - catch(SQLException& e) + catch(const SQLException& e) { ::dbaui::showError(::dbtools::SQLExceptionInfo(e),this,m_xORB); return 0; @@ -340,7 +340,7 @@ void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) } FillUserNames(); } - catch(SQLException& e) + catch(const SQLException& e) { ::dbaui::showError(::dbtools::SQLExceptionInfo(e),this,m_xORB); } |