summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-12-24 01:33:06 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-12-24 01:55:56 +0900
commitc9a54f532e6fbe2302167a7f8cb829b397f2569c (patch)
treebcc192b3ecfc1a0f82642a525b34fac2318c0cec
parent88b5b3688e516666fa693353a542b6c8302e6a45 (diff)
catch exception by constant reference
-rw-r--r--rdbmaker/source/rdbmaker/rdbmaker.cxx4
-rw-r--r--remotebridges/examples/officeclient.cxx8
-rw-r--r--remotebridges/source/unourl_resolver/unourl_resolver.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx4
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx8
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx4
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx2
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx6
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx4
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--sax/source/expatwrap/sax_expat.cxx20
16 files changed, 38 insertions, 38 deletions
diff --git a/rdbmaker/source/rdbmaker/rdbmaker.cxx b/rdbmaker/source/rdbmaker/rdbmaker.cxx
index fba84693b164..4a4e8ae32a60 100644
--- a/rdbmaker/source/rdbmaker/rdbmaker.cxx
+++ b/rdbmaker/source/rdbmaker/rdbmaker.cxx
@@ -313,7 +313,7 @@ int __cdecl main( int argc, char * argv[] )
exit(1);
}
}
- catch( IllegalArgument& e)
+ catch(const IllegalArgument& e)
{
fprintf(stderr, "Illegal option: %s\n", e.m_message.getStr());
cleanUp(sal_True);
@@ -496,7 +496,7 @@ int __cdecl main( int argc, char * argv[] )
}
}
}
- catch( CannotDumpException& e)
+ catch(const CannotDumpException& e)
{
fprintf(stderr, "%s ERROR: %s\n",
options.getProgramName().getStr(),
diff --git a/remotebridges/examples/officeclient.cxx b/remotebridges/examples/officeclient.cxx
index 40c902332406..adce0c14b7fd 100644
--- a/remotebridges/examples/officeclient.cxx
+++ b/remotebridges/examples/officeclient.cxx
@@ -214,25 +214,25 @@ sal_Int32 OfficeClientMain::run( const Sequence< OUString > & aArguments ) throw
}
}
- catch( ConnectionSetupException &e )
+ catch( const ConnectionSetupException &e )
{
OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
printf( "%s\n", o.pData->buffer );
printf( "couldn't access local resource ( possible security resons )\n" );
}
- catch( NoConnectException &e )
+ catch( const NoConnectException &e )
{
OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
printf( "%s\n", o.pData->buffer );
printf( "no server listening on the resource\n" );
}
- catch( IllegalArgumentException &e )
+ catch( const IllegalArgumentException &e )
{
OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
printf( "%s\n", o.pData->buffer );
printf( "uno url invalid\n" );
}
- catch( RuntimeException & e )
+ catch( const RuntimeException & e )
{
OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
printf( "%s\n", o.pData->buffer );
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index 459f2fe0efd0..f3abd3d125cc 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -150,7 +150,7 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
aConnectDescr = aUrl.getConnection().getDescriptor();
aInstanceName = aUrl.getObjectName();
}
- catch (rtl::MalformedUriException & rEx)
+ catch (const rtl::MalformedUriException & rEx)
{
throw ConnectionSetupException(rEx.getMessage(), 0);
}
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index f1c6e4d081e0..ee502b2029f3 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -393,7 +393,7 @@ void OObjectBase::EndListening(sal_Bool /*bRemoveListener*/)
{
m_xReportComponent->removePropertyChangeListener( ::rtl::OUString() , m_xPropertyChangeListener );
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
OSL_FAIL("OObjectBase::EndListening: Exception caught!");
}
@@ -1204,7 +1204,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod
xReceiver->attachDataProvider( xDataProvider.get() );
}
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
}
}
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 32b07becaf11..0bddd7d140ef 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -324,7 +324,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
{
xReportControlModel->setFontDescriptor(aFont);
}
- catch(beans::UnknownPropertyException){}
+ catch(const beans::UnknownPropertyException &){}
}
}
catch(uno::Exception&)
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 98272cd03380..b5ecd583e0f0 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -849,7 +849,7 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
m_pTree->SetEntryText(pEntry,lcl_getName(xProp));
}
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index d3f87a2ed202..77fbcdbc897d 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -75,7 +75,7 @@ DataProviderHandler::DataProviderHandler(uno::Reference< uno::XComponentContext
m_xFormComponentHandler.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.inspection.FormComponentPropertyHandler")),m_xContext),uno::UNO_QUERY_THROW);
m_xTypeConverter.set(m_xContext->getServiceManager()->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter" )),m_xContext),uno::UNO_QUERY_THROW);
- }catch(uno::Exception)
+ }catch(const uno::Exception &)
{
}
}
@@ -169,7 +169,7 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface
m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), m_xReportComponent.get(), aPropertyMediation,sal_True );
}
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
throw lang::NullPointerException();
}
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 94b1928a1951..3d00aac04d3b 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -266,7 +266,7 @@ namespace rptui
{
m_xComponent.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.inspection.DefaultFormComponentInspectorModel")),m_xContext),UNO_QUERY_THROW);
}
- catch(Exception)
+ catch(const Exception &)
{
return 0;
}
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index fe765ca001d9..45a698c4b58f 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -359,7 +359,7 @@ void SAL_CALL GeometryHandler::inspect( const uno::Reference< uno::XInterface >
if ( xSection.is() )
lcl_collectFunctionNames( xSection, m_aFunctionNames );
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
throw lang::NullPointerException();
}
@@ -1607,9 +1607,9 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected
if ( bSuccess )
_out_rSelectedClause = xComposer->getFilter();
}
- catch (sdb::SQLContext& e) { aErrorInfo = e; }
- catch (sdbc::SQLWarning& e) { aErrorInfo = e; }
- catch (sdbc::SQLException& e) { aErrorInfo = e; }
+ catch (const sdb::SQLContext& e) { aErrorInfo = e; }
+ catch (const sdbc::SQLWarning& e) { aErrorInfo = e; }
+ catch (const sdbc::SQLException& e) { aErrorInfo = e; }
catch( const uno::Exception& )
{
OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
index 36d951486dc3..5ae7b0285535 100644
--- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
+++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
@@ -56,7 +56,7 @@ ReportComponentHandler::ReportComponentHandler(uno::Reference< uno::XComponentCo
{
m_xFormComponentHandler.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.inspection.FormComponentPropertyHandler")),m_xContext),uno::UNO_QUERY_THROW);
- }catch(uno::Exception)
+ }catch(const uno::Exception &)
{
}
}
@@ -134,7 +134,7 @@ void SAL_CALL ReportComponentHandler::inspect(const uno::Reference< uno::XInterf
xProp->setPropertyValue(sRowSet,xNameCont->getByName(sRowSet));
}
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
throw lang::NullPointerException();
}
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 2f96dae6f5b7..c481463a0b1f 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -154,7 +154,7 @@ OSectionUndo::~OSectionUndo()
{
comphelper::disposeComponent(xShape);
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
OSL_FAIL("Exception caught!");
}
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 48195584d765..094960600ec5 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1051,9 +1051,9 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
}
}
}
- catch (sdb::SQLContext& e) { aErrorInfo = e; }
- catch (sdbc::SQLWarning& e) { aErrorInfo = e; }
- catch (sdbc::SQLException& e) { aErrorInfo = e; }
+ catch (const sdb::SQLContext& e) { aErrorInfo = e; }
+ catch (const sdbc::SQLWarning& e) { aErrorInfo = e; }
+ catch (const sdbc::SQLException& e) { aErrorInfo = e; }
catch( const uno::Exception& )
{
OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 95de847efb5a..fcdeb2627d94 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -120,7 +120,7 @@ namespace rptui
if ( xControlModel.is() )
setPlaceholderText( getVclWindowPeer( xControlModel.get() ), sDataField );
}
- catch (uno::Exception)
+ catch (const uno::Exception &)
{
DBG_UNHANDLED_EXCEPTION();
}
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 06ad80507e8e..dbc67153513a 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -606,9 +606,9 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
}
}
}
- catch(uno::Exception)
+ catch(const uno::Exception &)
{
- OSL_FAIL("Exception caught: OReportSection::_propertyChanged(");
+ OSL_FAIL("Exception caught: OReportSection::impl_adjustObjectSizePosition()");
}
}
//------------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 735b8ebb6c98..8de44eead00b 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -738,7 +738,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width - getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN),
xSection->getHeight()));
}
- catch(uno::Exception){}
+ catch(const uno::Exception &){}
}
}
else
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 8587e2843fad..bd65a52855f8 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -116,10 +116,10 @@ OUString XmlChar2OUString( const XML_Char *p )
try {\
pThis->call;\
}\
- catch( SAXParseException &e ) {\
+ catch( const SAXParseException &e ) {\
pThis->callErrorHandler( pThis , e );\
}\
- catch( SAXException &e ) {\
+ catch( const SAXException &e ) {\
pThis->callErrorHandler( pThis , SAXParseException(\
e.Message, \
e.Context, \
@@ -130,7 +130,7 @@ OUString XmlChar2OUString( const XML_Char *p )
pThis->rDocumentLocator->getColumnNumber()\
) );\
}\
- catch( com::sun::star::uno::RuntimeException &e ) {\
+ catch( const com::sun::star::uno::RuntimeException &e ) {\
pThis->bExceptionWasThrown = sal_True; \
pThis->bRTExceptionWasThrown = sal_True; \
pImpl->rtexception = e; \
@@ -899,12 +899,12 @@ int SaxExpatParser_Impl::callbackExternalEntityRef( XML_Parser parser,
XML_CHAR_TO_OUSTRING( publicId ) ,
XML_CHAR_TO_OUSTRING( systemId ) );
}
- catch( SAXParseException & e )
+ catch( const SAXParseException & e )
{
pImpl->exception = e;
bOK = sal_False;
}
- catch( SAXException & e )
+ catch( const SAXException & e )
{
pImpl->exception = SAXParseException(
e.Message , e.Context , e.WrappedException ,
@@ -929,17 +929,17 @@ int SaxExpatParser_Impl::callbackExternalEntityRef( XML_Parser parser,
{
pImpl->parse();
}
- catch( SAXParseException & e )
+ catch( const SAXParseException & e )
{
pImpl->exception = e;
bOK = sal_False;
}
- catch( IOException &e )
+ catch( const IOException &e )
{
pImpl->exception.WrappedException <<= e;
bOK = sal_False;
}
- catch( RuntimeException &e )
+ catch( const RuntimeException &e )
{
pImpl->exception.WrappedException <<=e;
bOK = sal_False;
@@ -998,11 +998,11 @@ void SaxExpatParser_Impl::callErrorHandler( SaxExpatParser_Impl *pImpl ,
pImpl->bExceptionWasThrown = sal_True;
}
}
- catch( SAXParseException & ex ) {
+ catch( const SAXParseException & ex ) {
pImpl->exception = ex;
pImpl->bExceptionWasThrown = sal_True;
}
- catch( SAXException & ex ) {
+ catch( const SAXException & ex ) {
pImpl->exception = SAXParseException(
ex.Message,
ex.Context,