diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-26 03:38:13 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-26 03:38:50 +0900 |
commit | 5451e9c702afb7c570662c740b33f2481abb7cb1 (patch) | |
tree | ef491adee50b35a977830dc9431eb308434cce4e /sdext | |
parent | bf2857d88af137ba15939d81970be92b0310c915 (diff) |
catch exception by constant reference
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/pdfiadaptor.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/pdfparse/pdfparse.cxx | 4 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterConfigurationAccess.cxx | 4 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterScreen.cxx | 5 |
4 files changed, 7 insertions, 8 deletions
diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index a8720def318b..1fc25d85932b 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -163,7 +163,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert m_xContext ), uno::UNO_QUERY ); } - catch(uno::Exception& e) + catch(const uno::Exception& e) { (void)e; OSL_TRACE( "subfilter exception: %s\n", diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index beecd3c8f23c..1638f523485f 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -577,7 +577,7 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen ) (int)aInfo.length ); #endif } - catch( parser_error<const char*, const char*>& rError ) + catch( const parser_error<const char*, const char*>& rError ) { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "parse error: %s at buffer pos %u\nobject stack:\n", @@ -657,7 +657,7 @@ PDFEntry* PDFReader::read( const char* pFileName ) (int)aInfo.length ); #endif } - catch( parser_error< const char*, file_iterator<> >& rError ) + catch( const parser_error< const char*, file_iterator<> >& rError ) { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "parse error: %s at buffer pos %u\nobject stack:\n", diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx index 5bdbed248217..36333b0d8ade 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.cxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx @@ -90,7 +90,7 @@ PresenterConfigurationAccess::PresenterConfigurationAccess ( maNode <<= mxRoot; } } - catch (Exception& rException) + catch (const Exception& rException) { OSL_TRACE ("caught exception while opening configuration: %s", ::rtl::OUStringToOString(rException.Message, @@ -195,7 +195,7 @@ Any PresenterConfigurationAccess::GetConfigurationNode ( return rxNode->getByHierarchicalName(sPathToNode); } } - catch (Exception& rException) + catch (const Exception& rException) { OSL_TRACE ("caught exception while getting configuration node %s: %s", ::rtl::OUStringToOString(sPathToNode, RTL_TEXTENCODING_UTF8).getStr(), diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index f904ab122fd9..82e3fcd5075a 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -511,7 +511,7 @@ void PresenterScreen::SwitchMonitors() uno::Any aDisplay; aDisplay <<= nNewScreen; xProperties->setPropertyValue(A2S("Display"), aDisplay); - } catch (const uno::Exception &e) { + } catch (const uno::Exception &) { } } @@ -873,9 +873,8 @@ void PresenterScreen::ProcessComponent ( nY+nHeight); } } - catch (Exception& e) + catch (const Exception&) { - (void)e; OSL_ASSERT(false); } } |