catch exception by constant reference

This commit is contained in:
Takeshi Abe
2011-12-21 21:57:16 +09:00
parent 7167559379
commit 7958f8244c
14 changed files with 74 additions and 75 deletions

View File

@@ -335,7 +335,7 @@ void SAL_CALL OHierarchyElement_Impl::commited( const ::com::sun::star::lang::Ev
{
Commit();
}
catch( uno::Exception& e )
catch( const uno::Exception& e )
{
throw lang::WrappedTargetRuntimeException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not commit storage sequence!" ) ),

View File

@@ -4843,13 +4843,13 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
try {
m_pImpl->ReadContents();
}
catch ( uno::RuntimeException& aRuntimeException )
catch ( const uno::RuntimeException& aRuntimeException )
{
m_pImpl->AddLog( aRuntimeException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
throw;
}
catch ( uno::Exception& aException )
catch ( const uno::Exception& aException )
{
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
@@ -4867,20 +4867,20 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
xPackPropSet->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ENCRYPTION_ALGORITHMS_PROPERTY ) ),
uno::makeAny( aAlgorithms ) );
}
catch ( uno::RuntimeException& aRuntimeException )
catch ( const uno::RuntimeException& aRuntimeException )
{
m_pImpl->AddLog( aRuntimeException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
throw;
}
catch( lang::IllegalArgumentException& aIAException )
catch( const lang::IllegalArgumentException& aIAException )
{
m_pImpl->AddLog( aIAException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
throw;
}
catch( uno::Exception& aException )
catch( const uno::Exception& aException )
{
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
@@ -4914,13 +4914,13 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
try {
m_pImpl->ReadContents();
}
catch ( uno::RuntimeException& aRuntimeException )
catch ( const uno::RuntimeException& aRuntimeException )
{
m_pImpl->AddLog( aRuntimeException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
throw;
}
catch ( uno::Exception& aException )
catch ( const uno::Exception& aException )
{
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
@@ -4937,13 +4937,13 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
{
xPackPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ENCRYPTION_ALGORITHMS_PROPERTY ) ) ) >>= aResult;
}
catch ( uno::RuntimeException& aRuntimeException )
catch ( const uno::RuntimeException& aRuntimeException )
{
m_pImpl->AddLog( aRuntimeException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );
throw;
}
catch( uno::Exception& aException )
catch( const uno::Exception& aException )
{
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Rethrow" ) ) );

View File

@@ -1025,7 +1025,7 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
aZipOut.write( aType, 0, nBufferLength );
aZipOut.closeEntry();
}
catch ( ::com::sun::star::io::IOException & r )
catch ( const ::com::sun::star::io::IOException & r )
{
throw WrappedTargetException(
OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Error adding mimetype to the ZipOutputStream!" ) ),
@@ -1419,7 +1419,7 @@ void SAL_CALL ZipPackage::commitChanges()
{
xTempSeek->seek( 0 );
}
catch( uno::Exception& r )
catch( const uno::Exception& r )
{
throw WrappedTargetException( OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Temporary file should be seekable!" ) ),
static_cast < OWeakObject * > ( this ), makeAny ( r ) );
@@ -1444,7 +1444,7 @@ void SAL_CALL ZipPackage::commitChanges()
// after successful truncation the original file contents are already lost
xTruncate->truncate();
}
catch( uno::Exception& r )
catch( const uno::Exception& r )
{
throw WrappedTargetException( OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "This package is read only!" ) ),
static_cast < OWeakObject * > ( this ), makeAny ( r ) );
@@ -1543,7 +1543,7 @@ void SAL_CALL ZipPackage::commitChanges()
// if the file is still not corrupted, it can become after the next step
aContent.executeCommand ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "transfer" ) ), aAny );
}
catch ( ::com::sun::star::uno::Exception& r )
catch ( const ::com::sun::star::uno::Exception& r )
{
if ( bCanBeCorrupted )
DisconnectFromTargetAndThrowException_Impl( xTempInStream );