diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-17 21:49:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-20 11:01:54 +0100 |
commit | c4ed8d454818971d959af7a80a986b7691bf43fb (patch) | |
tree | c68945eec35c8e8eed648f04ad141026685cb535 /ucb/source/ucp | |
parent | 051e6eea5a9363309883c6a92b77210e4284c316 (diff) |
catch by const reference
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/file/bc.cxx | 10 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrow.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/file/filstr.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/file/shell.cxx | 14 |
4 files changed, 17 insertions, 17 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 8242276ad604..c6d1191c525d 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -549,7 +549,7 @@ BaseContent::getContentType() OSL_FAIL( "BaseContent::getContentType - Property value was null!" ); } } - catch ( sdbc::SQLException const & ) + catch (const sdbc::SQLException&) { OSL_FAIL( "BaseContent::getContentType - Caught SQLException!" ); } @@ -681,7 +681,7 @@ BaseContent::createNewContent( // return Reference< XContent >(); } } - catch ( sdbc::SQLException const & ) + catch (const sdbc::SQLException&) { OSL_FAIL( "BaseContent::createNewContent - Caught SQLException!" ); return Reference< XContent >(); @@ -757,7 +757,7 @@ BaseContent::getParent( Reference< XContent > content = m_pMyShell->m_pProvider->queryContent( Identifier ); return Reference<XInterface>(content,UNO_QUERY); } - catch( IllegalIdentifierException ) + catch (const IllegalIdentifierException&) { return Reference< XInterface >(); } @@ -979,7 +979,7 @@ BaseContent::setPropertyValues( { endTask( nMyCommandIdentifier ); } - catch( const Exception& e ) + catch(const Exception& e) { ret[i] <<= e; } @@ -1209,7 +1209,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, contentTypeSet = false; } - catch ( sdbc::SQLException const & ) + catch (const sdbc::SQLException&) { OSL_FAIL( "BaseContent::insert - Caught SQLException!" ); contentTypeSet = false; diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index 5a49ed16dd0d..7dbdcf863f87 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -68,11 +68,11 @@ sal_Bool convert( shell* pShell, else no_success = sal_True; } - catch ( lang::IllegalArgumentException ) + catch (const lang::IllegalArgumentException&) { no_success = sal_True; } - catch ( script::CannotConvertException ) + catch (const script::CannotConvertException&) { no_success = sal_True; } diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 93cff9c667fd..c9157d13f2af 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -134,11 +134,11 @@ XStream_impl::~XStream_impl() { closeStream(); } - catch (io::IOException const &) + catch (const io::IOException&) { OSL_FAIL("unexpected situation"); } - catch (uno::RuntimeException const &) + catch (const uno::RuntimeException&) { OSL_FAIL("unexpected situation"); } @@ -216,7 +216,7 @@ XStream_impl::readBytes( { buffer = new sal_Int8[nBytesToRead]; } - catch( std::bad_alloc ) + catch (const std::bad_alloc&) { if( m_nIsOpen ) m_aFile.close(); throw io::BufferSizeExceededException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 0c7c0f30953f..3531740ed850 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -619,19 +619,19 @@ void SAL_CALL shell::page( sal_Int32 CommandId, { xOutputStream->writeBytes( seq ); } - catch( io::NotConnectedException ) + catch (const io::NotConnectedException&) { installError( CommandId, TASKHANDLING_NOTCONNECTED_FOR_PAGING ); break; } - catch( io::BufferSizeExceededException ) + catch (const io::BufferSizeExceededException&) { installError( CommandId, TASKHANDLING_BUFFERSIZEEXCEEDED_FOR_PAGING ); break; } - catch( io::IOException ) + catch (const io::IOException&) { installError( CommandId, TASKHANDLING_IOEXCEPTION_FOR_PAGING ); @@ -655,13 +655,13 @@ void SAL_CALL shell::page( sal_Int32 CommandId, { xOutputStream->closeOutput(); } - catch( io::NotConnectedException ) + catch (const io::NotConnectedException&) { } - catch( io::BufferSizeExceededException ) + catch (const io::BufferSizeExceededException&) { } - catch( io::IOException ) + catch (const io::IOException&) { } } @@ -888,7 +888,7 @@ shell::setv( const rtl::OUString& aUnqPath, { it->second.xS->setPropertyValue( values[i].Name,values[i].Value ); } - catch( const uno::Exception& e ) + catch (const uno::Exception&e) { --propChanged; // unsuccessful setting ret[i] <<= e; |