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/dom | |
parent | 5b031b4ea68df5ca210a5631c801414b476d8094 (diff) |
catch exception by constant reference
Diffstat (limited to 'unoxml/source/dom')
-rw-r--r-- | unoxml/source/dom/documentbuilder.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/dom/elementlist.cxx | 2 |
2 files changed, 3 insertions, 3 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()); |