diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-15 13:51:29 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-15 13:52:23 +0900 |
commit | 0f44079ce20ece1931c40f62584013ac6d1668e4 (patch) | |
tree | e18d86d4feac4d33f81f03eddf12d53c4391eba9 /jvmfwk/source | |
parent | 535e37abdb43cf41990fcbd0ef85315b2413c4e3 (diff) |
catch exception by constant reference
Diffstat (limited to 'jvmfwk/source')
-rw-r--r-- | jvmfwk/source/framework.cxx | 30 | ||||
-rw-r--r-- | jvmfwk/source/fwkutil.cxx | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 0fdae53a5479..99f543f90b06 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -234,7 +234,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi *pSize = nSize; return errcode; } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { retVal = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -417,7 +417,7 @@ javaFrameworkError SAL_CALL jfw_startVM(JavaVMOption *arOptions, sal_Int32 cOpti } OSL_ASSERT(plerr != JFW_PLUGIN_E_WRONG_VENDOR); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -626,7 +626,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) errcode = JFW_E_NO_JAVA_FOUND; } } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -715,7 +715,7 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo) return JFW_E_INVALID_SETTINGS; *ppInfo = aInfo.detach(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -843,7 +843,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath( if (*ppInfo == NULL && errcode != JFW_E_FAILED_VERSION) errcode = JFW_E_NOT_RECOGNIZED; } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -877,7 +877,7 @@ javaFrameworkError SAL_CALL jfw_setSelectedJRE(JavaInfo const *pInfo) jfw::setJavaSelected(); } } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -910,7 +910,7 @@ javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled) node.setEnabled(bEnabled); node.write(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -932,7 +932,7 @@ javaFrameworkError SAL_CALL jfw_getEnabled(sal_Bool *pbEnabled) jfw::MergedSettings settings; *pbEnabled = settings.getEnabled(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -957,7 +957,7 @@ javaFrameworkError SAL_CALL jfw_setVMParameters( node.setVmParameters(arOptions, nLen); node.write(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -982,7 +982,7 @@ javaFrameworkError SAL_CALL jfw_getVMParameters( const jfw::MergedSettings settings; settings.getVmParametersArray(parOptions, pLen); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -1005,7 +1005,7 @@ javaFrameworkError SAL_CALL jfw_setUserClassPath(rtl_uString * pCp) node.setUserClassPath(pCp); node.write(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -1028,7 +1028,7 @@ javaFrameworkError SAL_CALL jfw_getUserClassPath(rtl_uString ** ppCP) *ppCP = settings.getUserClassPath().pData; rtl_uString_acquire(*ppCP); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -1052,7 +1052,7 @@ javaFrameworkError SAL_CALL jfw_addJRELocation(rtl_uString * sLocation) node.addJRELocation(sLocation); node.write(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -1078,7 +1078,7 @@ javaFrameworkError SAL_CALL jfw_setJRELocations( node.setJRELocations(arLocations, nLen); node.write(); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); @@ -1103,7 +1103,7 @@ javaFrameworkError SAL_CALL jfw_getJRELocations( const jfw::MergedSettings settings; settings.getJRELocations(parLocations, pLen); } - catch (jfw::FrameworkException& e) + catch (const jfw::FrameworkException& e) { errcode = e.errorCode; fprintf(stderr, "%s\n", e.message.getStr()); diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 022ee424fe78..4b8c223b768e 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -229,7 +229,7 @@ rtl::OUString findPlugin( { expandedPlugin = cppu::bootstrap_expandUri(plugin); } - catch (com::sun::star::lang::IllegalArgumentException & e) + catch (const com::sun::star::lang::IllegalArgumentException & e) { throw FrameworkException( JFW_E_ERROR, @@ -244,7 +244,7 @@ rtl::OUString findPlugin( { sUrl = rtl::Uri::convertRelToAbs(baseUrl, expandedPlugin); } - catch (rtl::MalformedUriException & e) + catch (const rtl::MalformedUriException & e) { throw FrameworkException( JFW_E_ERROR, |