catch exception by constant reference
This commit is contained in:
@@ -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!" ) ),
|
||||
|
@@ -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" ) ) );
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user