diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-01-08 03:34:57 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-01-08 03:35:43 +0900 |
commit | ff580eb39b46646309feba447f6bf485124db6b1 (patch) | |
tree | 5dbea85aed84589c0c1bd9859f487b9af0df7558 /unoxml/source | |
parent | 5b031b4ea68df5ca210a5631c801414b476d8094 (diff) |
catch exception by constant reference
Diffstat (limited to 'unoxml/source')
-rw-r--r-- | unoxml/source/dom/documentbuilder.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/dom/elementlist.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index b5c19d0a5a40..6104a5aa7ec8 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -220,7 +220,7 @@ namespace DOM // copy bytes to the provided buffer rtl_copyMemory(buffer, chunk.getConstArray(), nread); return nread; - } catch (com::sun::star::uno::Exception& ex) { + } catch (const com::sun::star::uno::Exception& ex) { (void) ex; OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); return -1; @@ -240,7 +240,7 @@ namespace DOM if (pctx->freeOnClose) delete pctx; return 0; - } catch (com::sun::star::uno::Exception& ex) { + } catch (const com::sun::star::uno::Exception& ex) { (void) ex; OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); return -1; diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx index f12795273882..ae66fa6e8ed3 100644 --- a/unoxml/source/dom/elementlist.cxx +++ b/unoxml/source/dom/elementlist.cxx @@ -69,7 +69,7 @@ namespace DOM sal_Bool capture = sal_False; xTarget->addEventListener(aType, Reference< XEventListener >(this), capture); - } catch (Exception &e){ + } catch (const Exception &e){ OString aMsg("Exception caught while registering NodeList as listener:\n"); aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OSL_FAIL(aMsg.getStr()); diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 7f8b18332ac1..f292682fbbcd 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -867,7 +867,7 @@ throw (uno::RuntimeException) reinterpret_cast<const char *>(id))); try { return rdf::BlankNode::create(m_xContext, nodeID); - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::createBlankNode: " @@ -1495,7 +1495,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, xXmlId.set( rdf::URI::create(m_xContext, ::rtl::OUString::createFromAscii(s_nsOOo) + sXmlId), uno::UNO_QUERY_THROW); - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::setStatementRDFa: " @@ -1516,7 +1516,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, xContent.set(rdf::Literal::create(m_xContext, content), uno::UNO_QUERY_THROW); } - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::setStatementRDFa: " @@ -1556,7 +1556,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, + mdref.First + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second), uno::UNO_QUERY_THROW); - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::removeStatementRDFa: " @@ -1587,7 +1587,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, xXmlId.set( rdf::URI::create(m_xContext, ::rtl::OUString::createFromAscii(s_nsOOo) + sXmlId), uno::UNO_QUERY_THROW); - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::getStatementRDFa: " @@ -2144,7 +2144,7 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const RTL_TEXTENCODING_UTF8) ); try { return rdf::URI::create(m_xContext, uriU); - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::convertToXURI: " @@ -2187,7 +2187,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const try { return uno::Reference<rdf::XResource>( rdf::BlankNode::create(m_xContext, labelU), uno::UNO_QUERY); - } catch (lang::IllegalArgumentException & iae) { + } catch (const lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::convertToXResource: " |