summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-01-06 00:03:58 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-01-06 00:22:51 +0900
commit5493951893ea90b330d5280bc171a60ff46fa396 (patch)
tree97dee1e30575dc05959acaa2cec6da9b791022d7 /svtools
parentRemoved unnecessary tools includes. (diff)
downloadcore-5493951893ea90b330d5280bc171a60ff46fa396.tar.gz
core-5493951893ea90b330d5280bc171a60ff46fa396.zip
catch exception by constant reference
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/itemholder2.cxx4
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx6
-rw-r--r--svtools/source/misc/chartprettypainter.cxx3
-rw-r--r--svtools/workben/svdem.cxx2
-rw-r--r--svtools/workben/treecontrol/treetest.cxx4
5 files changed, 9 insertions, 10 deletions
diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx
index 0105c6d2cfd7..9e9a1ab8ced3 100644
--- a/svtools/source/config/itemholder2.cxx
+++ b/svtools/source/config/itemholder2.cxx
@@ -69,12 +69,12 @@ ItemHolder2::ItemHolder2()
if (xCfg.is())
xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
}
- catch(css::uno::RuntimeException& rREx)
+ catch(const css::uno::RuntimeException& rREx)
{
throw rREx;
}
#ifdef DBG_UTIL
- catch(css::uno::Exception& rEx)
+ catch(const css::uno::Exception& rEx)
{
static sal_Bool bMessage = sal_True;
if(bMessage)
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index fa322a79979f..7f8198435a30 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -899,9 +899,9 @@ void AssignmentPersistentData::Commit()
aTableNames = m_xCurrentDatasourceTables->getElementNames();
}
}
- catch(SQLContext& e) { aException <<= e; }
- catch(SQLWarning& e) { aException <<= e; }
- catch(SQLException& e) { aException <<= e; }
+ catch(const SQLContext& e) { aException <<= e; }
+ catch(const SQLWarning& e) { aException <<= e; }
+ catch(const SQLException& e) { aException <<= e; }
catch(Exception&)
{
OSL_FAIL("AddressBookSourceDialog::resetTables: could not retrieve the table!");
diff --git a/svtools/source/misc/chartprettypainter.cxx b/svtools/source/misc/chartprettypainter.cxx
index e74b7ea0804f..a9fd9f4e57fd 100644
--- a/svtools/source/misc/chartprettypainter.cxx
+++ b/svtools/source/misc/chartprettypainter.cxx
@@ -120,9 +120,8 @@ bool ChartPrettyPainter::DoPrettyPaintChart( uno::Reference< frame::XModel > xCh
}
}
}
- catch( uno::Exception& e )
+ catch( uno::Exception& )
{
- (void)e;
OSL_FAIL( "Chart cannot be painted pretty!" );
}
return false;
diff --git a/svtools/workben/svdem.cxx b/svtools/workben/svdem.cxx
index 776f67e0a97d..3989a0c8d029 100644
--- a/svtools/workben/svdem.cxx
+++ b/svtools/workben/svdem.cxx
@@ -254,7 +254,7 @@ void MyApp::Main()
Execute();
}
- catch ( com::sun::star::uno::Exception & e )
+ catch ( const com::sun::star::uno::Exception & e )
{
fprintf( stderr, "Error during bootstrapping servicemanager: %s\n" ,
rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
diff --git a/svtools/workben/treecontrol/treetest.cxx b/svtools/workben/treecontrol/treetest.cxx
index 4a9be57a3c39..53027052dd40 100644
--- a/svtools/workben/treecontrol/treetest.cxx
+++ b/svtools/workben/treecontrol/treetest.cxx
@@ -358,7 +358,7 @@ int SAL_CALL main( int argc, char **argv )
xInterface = Reference< XInterface >(
resolver->resolve( sConnectionString ), UNO_QUERY );
}
- catch ( Exception& e )
+ catch ( const Exception& e )
{
printf("Error: cannot establish a connection using '%s':\n %s\n",
OUStringToOString(sConnectionString, RTL_TEXTENCODING_ASCII_US).getStr(),
@@ -382,7 +382,7 @@ int SAL_CALL main( int argc, char **argv )
rtl::Reference< DirectoryTree >(
new DirectoryTree( xComponentContext ) )->display(ustrFileURL);
}
- catch( Exception& e )
+ catch( const Exception& e )
{
printf("Error: exception caught during test:\n %s\n",
OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());