diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-10 22:14:57 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-10 22:16:07 +0900 |
commit | 93a9f170be76965ec004b200ac939e55e8382ca0 (patch) | |
tree | 2631f1e25117ae2bef93935fb3dab41d13c728db /extensions/source/dbpilots | |
parent | 1688a9d9235dd2ee4f3b9497308efd41f7a3fb6f (diff) |
catch exception by constant reference
Diffstat (limited to 'extensions/source/dbpilots')
-rw-r--r-- | extensions/source/dbpilots/commonpagesdbp.cxx | 24 | ||||
-rw-r--r-- | extensions/source/dbpilots/controlwizard.cxx | 24 | ||||
-rw-r--r-- | extensions/source/dbpilots/dbptools.cxx | 2 | ||||
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 2 | ||||
-rw-r--r-- | extensions/source/dbpilots/groupboxwiz.cxx | 2 | ||||
-rw-r--r-- | extensions/source/dbpilots/listcombowizard.cxx | 6 |
6 files changed, 30 insertions, 30 deletions
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index ca7740c9fb89..eb455bc2a624 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -154,7 +154,7 @@ namespace dbp } } } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OTableSelectionPage::initializePage: caught an exception!"); } @@ -189,7 +189,7 @@ namespace dbp if (!updateContext()) return sal_False; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OTableSelectionPage::commitPage: caught an exception!"); } @@ -311,10 +311,10 @@ namespace dbp } } } - catch(SQLContext& e) { aSQLException <<= e; } - catch(SQLWarning& e) { aSQLException <<= e; } - catch(SQLException& e) { aSQLException <<= e; } - catch (Exception&) + catch(const SQLContext& e) { aSQLException <<= e; } + catch(const SQLWarning& e) { aSQLException <<= e; } + catch(const SQLException& e) { aSQLException <<= e; } + catch (const Exception&) { OSL_FAIL("OTableSelectionPage::implFillTables: could not fill the table list!"); } @@ -343,10 +343,10 @@ namespace dbp aQueryNames = xQueries->getElementNames(); } } - catch(SQLContext& e) { aSQLException <<= e; } - catch(SQLWarning& e) { aSQLException <<= e; } - catch(SQLException& e) { aSQLException <<= e; } - catch (Exception&) + catch(const SQLContext& e) { aSQLException <<= e; } + catch(const SQLWarning& e) { aSQLException <<= e; } + catch(const SQLException& e) { aSQLException <<= e; } + catch (const Exception&) { OSL_FAIL("OTableSelectionPage::implFillTables: could not fill the table list!"); } @@ -363,7 +363,7 @@ namespace dbp if ( xHandler.is() ) xHandler->handle(xRequest); } - catch(Exception&) { } + catch(const Exception&) { } return; } @@ -387,7 +387,7 @@ namespace dbp if (m_xDSContext.is()) fillListBox(m_aDatasource, m_xDSContext->getElementNames()); } - catch (Exception&) + catch (const Exception&) { OSL_FAIL("OTableSelectionPage::implCollectDatasource: could not collect the data source names!"); } diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 899acca822a6..234c0fd0c088 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -306,7 +306,7 @@ namespace dbp { getContext().xObjectModel->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId"))) >>= nClassId; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OControlWizard::activate: could not obtain the class id!"); } @@ -430,7 +430,7 @@ namespace dbp } m_aContext.xDrawPage = xPage; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OControlWizard::implDeterminePage: caught an exception!"); } @@ -452,7 +452,7 @@ namespace dbp m_aContext.xDatasourceContext = Reference< XNameAccess >(xContext, UNO_QUERY); DBG_ASSERT(m_aContext.xDatasourceContext.is() || !xContext.is(), "OControlWizard::implGetDSContext: invalid database context (missing the XNameAccess)!"); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OControlWizard::implGetDSContext: invalid database context!"); } @@ -524,7 +524,7 @@ namespace dbp if (getServiceFactory().is()) xHandler = Reference< XInteractionHandler >(getServiceFactory()->createInstance(sInteractionHandlerServiceName), UNO_QUERY); } - catch(Exception&) { } + catch(const Exception&) { } if (!xHandler.is()) ShowServiceNotAvailableError(_pWindow, sInteractionHandlerServiceName, sal_True); return xHandler; @@ -642,7 +642,7 @@ namespace dbp xColumns->getByName(*pBegin) >>= xColumn; xColumn->getPropertyValue(s_sFieldTypeProperty) >>= nFieldType; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OControlWizard::initContext: unexpected exception while gathering column information!"); } @@ -650,10 +650,10 @@ namespace dbp } } } - catch(SQLContext& e) { aSQLException <<= e; } - catch(SQLWarning& e) { aSQLException <<= e; } - catch(SQLException& e) { aSQLException <<= e; } - catch(Exception&) + catch(const SQLContext& e) { aSQLException <<= e; } + catch(const SQLWarning& e) { aSQLException <<= e; } + catch(const SQLException& e) { aSQLException <<= e; } + catch(const Exception&) { OSL_FAIL("OControlWizard::initContext: could not retrieve the control context (caught an exception)!"); } @@ -678,7 +678,7 @@ namespace dbp { xHandler->handle(xRequest); } - catch(Exception&) { } + catch(const Exception&) { } return sal_False; } @@ -706,7 +706,7 @@ namespace dbp ); } } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OControlWizard::commitControlSettings: could not commit the basic control settings!"); } @@ -731,7 +731,7 @@ namespace dbp _pSettings->sControlLabel = sControlLabel; } } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OControlWizard::initControlSettings: could not retrieve the basic control settings!"); } diff --git a/extensions/source/dbpilots/dbptools.cxx b/extensions/source/dbpilots/dbptools.cxx index 970bb59d6b9a..8df666e8ec9b 100644 --- a/extensions/source/dbpilots/dbptools.cxx +++ b/extensions/source/dbpilots/dbptools.cxx @@ -57,7 +57,7 @@ namespace dbp // can't do anything ... no free names _rElementsName = sBase; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("::dbp::disambiguateName: something went (strangely) wrong!"); } diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index f7f867eeac45..3f997295a816 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -223,7 +223,7 @@ namespace dbp // insert the column xColumnContainer->insertByName(sColumnName, makeAny(xColumn)); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL( ( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ") += ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), osl_getThreadTextEncoding()) diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 2e86570124ff..de3026902aca 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -173,7 +173,7 @@ namespace dbp OOptionGroupLayouter aLayouter(getServiceFactory()); aLayouter.doLayout(getContext(), getSettings()); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OGroupBoxWizard::createRadios: caught an exception while creating the radio shapes!"); } diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 5f7b710173aa..674555fb07a8 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -218,7 +218,7 @@ namespace dbp // the bound field getContext().xObjectModel->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataField")), makeAny(::rtl::OUString(getSettings().sLinkedFormField))); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OListComboWizard::implApplySettings: could not set the property values for the listbox!"); } @@ -277,7 +277,7 @@ namespace dbp if (xColumns.is()) aColumnNames = xColumns->getElementNames(); } - catch(Exception&) + catch(const Exception&) { DBG_ASSERT(!_bNeedIt, "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns!"); } @@ -349,7 +349,7 @@ namespace dbp aTableNames = xTables->getElementNames(); fillListBox(m_aSelectTable, aTableNames); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OContentTableSelection::initializePage: could not retrieve the table names!"); } |