summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-05-17 22:39:12 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-05-17 22:44:43 +0900
commit5e3a4ecb0ad61faff9fb867e9b4abd092aa115b7 (patch)
treeaf060998430b2ea065e8d927d273562f817816dd /dbaccess
parent9902f0ee3d7b22e4984be7225370fb552da03838 (diff)
catch by const reference
Change-Id: I80a26483c4ecd099a1cfe76bdac1e97b947ef104
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx8
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx4
3 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 3964aafa5011..696921f71d4c 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -283,7 +283,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
{
showError( SQLExceptionInfo( ::cppu::getCaughtException() ) );
}
- catch(WrappedTargetException& e)
+ catch(const WrappedTargetException& e)
{
SQLException aSql;
if ( e.TargetException >>= aSql )
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);
}