summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 14:27:45 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-13 16:50:43 +0100
commit4363d620076d3624d96bdde5ad72d88065858071 (patch)
treea7da5dc94879b317210c6ca046bb252316541639 /ucb
parentdbb2c4348eb885830a5588071fdf8a1d8871b89b (diff)
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucb.cxx28
-rw-r--r--ucb/source/core/ucbcmds.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx6
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx6
-rw-r--r--ucb/source/ucp/file/bc.cxx15
-rw-r--r--ucb/source/ucp/file/filinpstr.cxx4
-rw-r--r--ucb/source/ucp/file/filstr.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.cxx30
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyprovider.cxx3
-rw-r--r--ucb/source/ucp/odma/odma_inputstream.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx72
-rw-r--r--ucb/source/ucp/tdoc/tdoc_datasupplier.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx39
-rw-r--r--ucb/source/ucp/tdoc/tdoc_stgelems.cxx8
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx23
16 files changed, 111 insertions, 141 deletions
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 8325bacb5f..0ec79b928e 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -200,8 +200,7 @@ bool createContentProviderData(
if ( !( rxHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
}
}
@@ -219,8 +218,7 @@ bool createContentProviderData(
if ( !( rxHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
}
@@ -233,8 +231,7 @@ bool createContentProviderData(
if ( !( rxHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
}
@@ -786,14 +783,14 @@ bool UniversalContentBroker::configureUcb()
if (m_aArguments.getLength() < 2
|| !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2))
{
- OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): Bad arguments");
+ OSL_FAIL("UniversalContentBroker::configureUcb(): Bad arguments");
return false;
}
ContentProviderDataList aData;
if (!getContentProviderData(aKey1, aKey2, aData))
{
- OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): No configuration");
+ OSL_FAIL("UniversalContentBroker::configureUcb(): No configuration");
return false;
}
@@ -823,8 +820,7 @@ void UniversalContentBroker::prepareAndRegister(
}
else
- OSL_ENSURE(false,
- "UniversalContentBroker::prepareAndRegister(): Bad argument placeholders");
+ OSL_FAIL("UniversalContentBroker::prepareAndRegister(): Bad argument placeholders");
}
}
@@ -836,8 +832,7 @@ bool UniversalContentBroker::getContentProviderData(
{
if ( !m_xSMgr.is() || !rKey1.getLength() || !rKey2.getLength() )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - Invalid argument!" );
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - Invalid argument!" );
return false;
}
@@ -913,8 +908,7 @@ bool UniversalContentBroker::getContentProviderData(
catch ( container::NoSuchElementException& )
{
// getByHierarchicalName
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"caught NoSuchElementException!" );
}
}
@@ -922,16 +916,14 @@ bool UniversalContentBroker::getContentProviderData(
}
catch ( uno::RuntimeException& )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - caught RuntimeException!" );
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - caught RuntimeException!" );
return false;
}
catch ( uno::Exception& )
{
// createInstance, createInstanceWithArguments
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - caught Exception!" );
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - caught Exception!" );
return false;
}
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 6aad4da227..ea53702c51 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1438,7 +1438,7 @@ void globalTransfer_(
"BUG: UnsupportedNameClashException not allowed here!" );
if (exc.NameClash != ucb::NameClash::ERROR) {
- OSL_ENSURE( false, "BUG: NameClash::ERROR expected!" );
+ OSL_FAIL( "BUG: NameClash::ERROR expected!" );
}
// No chance to solve name clashes, because I'm not able to detect
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index cd5f3e47cc..85bf661ca3 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -385,7 +385,7 @@ namespace ucb { namespace ucp { namespace ext
}
default:
- OSL_ENSURE( false, "Content::getParentURL: unhandled case!" );
+ OSL_FAIL( "Content::getParentURL: unhandled case!" );
break;
}
return ::rtl::OUString();
@@ -514,11 +514,11 @@ namespace ucb { namespace ucp { namespace ext
}
default:
- OSL_ENSURE( false, "Content::getPropertyValues: unhandled case!" );
+ OSL_FAIL( "Content::getPropertyValues: unhandled case!" );
break;
}
- OSL_ENSURE( false, "Content::getPropertyValues: unreachable!" );
+ OSL_FAIL( "Content::getPropertyValues: unreachable!" );
return NULL;
}
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 703d2df379..c15ca969db 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -194,7 +194,7 @@ namespace ucb { namespace ucp { namespace ext
}
break;
default:
- OSL_ENSURE( false, "DataSupplier::fetchData: unimplemented content type!" );
+ OSL_FAIL( "DataSupplier::fetchData: unimplemented content type!" );
break;
}
}
@@ -221,7 +221,7 @@ namespace ucb { namespace ucp { namespace ext
return sId;
}
- OSL_ENSURE( false, "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" );
+ OSL_FAIL( "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" );
return ::rtl::OUString();
}
@@ -344,7 +344,7 @@ namespace ucb { namespace ucp { namespace ext
}
break;
default:
- OSL_ENSURE( false, "DataSupplier::queryPropertyValues: unhandled case!" );
+ OSL_FAIL( "DataSupplier::queryPropertyValues: unhandled case!" );
break;
}
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 7d63e9117b..0120d46c51 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -546,14 +546,12 @@ BaseContent::getContentType()
}
else
{
- OSL_ENSURE( false,
- "BaseContent::getContentType - Property value was null!" );
+ OSL_FAIL( "BaseContent::getContentType - Property value was null!" );
}
}
catch ( sdbc::SQLException const & )
{
- OSL_ENSURE( false,
- "BaseContent::getContentType - Caught SQLException!" );
+ OSL_FAIL( "BaseContent::getContentType - Caught SQLException!" );
}
}
}
@@ -679,15 +677,13 @@ BaseContent::createNewContent(
if ( xRow->wasNull() )
{
IsDocument = false;
-// OSL_ENSURE( false,
-// "BaseContent::createNewContent - Property value was null!" );
+// OSL_FAIL( // "BaseContent::createNewContent - Property value was null!" );
// return Reference< XContent >();
}
}
catch ( sdbc::SQLException const & )
{
- OSL_ENSURE( false,
- "BaseContent::createNewContent - Caught SQLException!" );
+ OSL_FAIL( "BaseContent::createNewContent - Caught SQLException!" );
return Reference< XContent >();
}
@@ -1215,8 +1211,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
}
catch ( sdbc::SQLException const & )
{
- OSL_ENSURE( false,
- "BaseContent::insert - Caught SQLException!" );
+ OSL_FAIL( "BaseContent::insert - Caught SQLException!" );
contentTypeSet = false;
}
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx
index 368a1299e0..a7af4b64c0 100644
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -74,11 +74,11 @@ XInputStream_impl::~XInputStream_impl()
}
catch (io::IOException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
catch (uno::RuntimeException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
}
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 5a28a4c138..7efe373052 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -136,11 +136,11 @@ XStream_impl::~XStream_impl()
}
catch (io::IOException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
catch (uno::RuntimeException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index d4b9967682..ade87edd85 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -402,8 +402,7 @@ HierarchyDataSource::createInstanceWithArguments(
if ( !bReadOnly && !bReadWrite )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Unsupported service specifier!" );
return uno::Reference< uno::XInterface >();
}
@@ -434,8 +433,7 @@ HierarchyDataSource::createInstanceWithArguments(
rtl::OUString aConfigPath;
if ( !createConfigPath( aPath, aConfigPath ) )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::"
+ OSL_FAIL( "HierarchyDataSource::"
"createInstanceWithArguments - "
"Invalid node path!" );
return uno::Reference< uno::XInterface >();
@@ -451,8 +449,7 @@ HierarchyDataSource::createInstanceWithArguments(
}
else
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Invalid type for property 'nodepath'!" );
return uno::Reference< uno::XInterface >();
}
@@ -470,8 +467,7 @@ HierarchyDataSource::createInstanceWithArguments(
}
else
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Invalid type for property 'lazywrite'!" );
return uno::Reference< uno::XInterface >();
}
@@ -481,8 +477,7 @@ HierarchyDataSource::createInstanceWithArguments(
if ( !bHasNodePath )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"No 'nodepath' property!" );
return uno::Reference< uno::XInterface >();
}
@@ -528,16 +523,14 @@ HierarchyDataSource::createInstanceWithArguments(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Cannot instanciate configuration access!" );
throw;
}
if ( !xConfigAccess.is() )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Cannot instanciate configuration access!" );
return xConfigAccess;
}
@@ -572,8 +565,7 @@ HierarchyDataSource::getConfigProvider()
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::getConfigProvider - "
+ OSL_FAIL( "HierarchyDataSource::getConfigProvider - "
"caught exception!" );
}
}
@@ -590,16 +582,14 @@ bool HierarchyDataSource::createConfigPath(
{
if ( rInPath.indexOf( '/' ) == 0 )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createConfigPath - "
+ OSL_FAIL( "HierarchyDataSource::createConfigPath - "
"Leading slash in node path!" );
return false;
}
if ( rInPath.lastIndexOf( '/' ) == rInPath.getLength() - 1 )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createConfigPath - "
+ OSL_FAIL( "HierarchyDataSource::createConfigPath - "
"Trailing slash in node path!" );
return false;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
index e040babf18..fde2dde87a 100644
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
@@ -166,8 +166,7 @@ void SAL_CALL HierarchyContentProvider::initialize(
throw( uno::Exception, uno::RuntimeException )
{
if ( aArguments.getLength() > 0 )
- OSL_ENSURE( false,
- "HierarchyContentProvider::initialize : not supported!" );
+ OSL_FAIL( "HierarchyContentProvider::initialize : not supported!" );
}
//=========================================================================
diff --git a/ucb/source/ucp/odma/odma_inputstream.cxx b/ucb/source/ucp/odma/odma_inputstream.cxx
index 81cc385d1b..6c24be704f 100644
--- a/ucb/source/ucp/odma/odma_inputstream.cxx
+++ b/ucb/source/ucp/odma/odma_inputstream.cxx
@@ -77,11 +77,11 @@ OOdmaStream::~OOdmaStream()
}
catch (io::IOException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
catch (uno::RuntimeException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
}
// -----------------------------------------------------------------------------
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 8ffdcb0116..67bf4aad89 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -2460,13 +2460,13 @@ bool Content::loadData( ContentProvider* pProvider,
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for any reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
}
@@ -2485,7 +2485,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
- OSL_ENSURE( false, "storeData not supported by root and documents!" );
+ OSL_FAIL( "storeData not supported by root and documents!" );
return false;
}
@@ -2519,22 +2519,22 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
}
catch ( beans::UnknownPropertyException const & )
{
- OSL_ENSURE( false, "Property MediaType not supported!" );
+ OSL_FAIL( "Property MediaType not supported!" );
return false;
}
catch ( beans::PropertyVetoException const & )
{
- OSL_ENSURE( false, "Caught PropertyVetoException!" );
+ OSL_FAIL( "Caught PropertyVetoException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( lang::WrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
return false;
}
@@ -2580,21 +2580,21 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
catch ( io::NotConnectedException const & )
{
// readSomeBytes, writeBytes
- OSL_ENSURE( false, "Caught NotConnectedException!" );
+ OSL_FAIL( "Caught NotConnectedException!" );
closeOutputStream( xOut );
return false;
}
catch ( io::BufferSizeExceededException const & )
{
// readSomeBytes, writeBytes
- OSL_ENSURE( false, "Caught BufferSizeExceededException!" );
+ OSL_FAIL( "Caught BufferSizeExceededException!" );
closeOutputStream( xOut );
return false;
}
catch ( io::IOException const & )
{
// readSomeBytes, writeBytes
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
closeOutputStream( xOut );
return false;
}
@@ -2611,7 +2611,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
}
else
{
- OSL_ENSURE( false, "Unknown content type!" );
+ OSL_FAIL( "Unknown content type!" );
return false;
}
return true;
@@ -2627,7 +2627,7 @@ bool Content::renameData(
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
- OSL_ENSURE( false, "renameData not supported by root and documents!" );
+ OSL_FAIL( "renameData not supported by root and documents!" );
return false;
}
@@ -2648,37 +2648,37 @@ bool Content::renameData(
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for eny reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( container::NoSuchElementException const & )
{
// there is no element with old name in this storage
- OSL_ENSURE( false, "Caught NoSuchElementException!" );
+ OSL_FAIL( "Caught NoSuchElementException!" );
return false;
}
catch ( container::ElementExistException const & )
{
// an element with new name already exists in this storage
- OSL_ENSURE( false, "Caught ElementExistException!" );
+ OSL_FAIL( "Caught ElementExistException!" );
return false;
}
catch ( io::IOException const & )
{
// in case of io errors during renaming
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( embed::StorageWrappedTargetException const & )
{
// wraps other exceptions
- OSL_ENSURE( false, "Caught StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught StorageWrappedTargetException!" );
return false;
}
@@ -2693,7 +2693,7 @@ bool Content::removeData()
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
- OSL_ENSURE( false, "removeData not supported by root and documents!" );
+ OSL_FAIL( "removeData not supported by root and documents!" );
return false;
}
@@ -2712,31 +2712,31 @@ bool Content::removeData()
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for eny reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( container::NoSuchElementException const & )
{
// there is no element with this name in this storage
- OSL_ENSURE( false, "Caught NoSuchElementException!" );
+ OSL_FAIL( "Caught NoSuchElementException!" );
return false;
}
catch ( io::IOException const & )
{
// in case of io errors during renaming
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( embed::StorageWrappedTargetException const & )
{
// wraps other exceptions
- OSL_ENSURE( false, "Caught StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught StorageWrappedTargetException!" );
return false;
}
@@ -2751,7 +2751,7 @@ bool Content::copyData( const Uri & rSourceUri, const rtl::OUString & rNewName )
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == STREAM ) )
{
- OSL_ENSURE( false, "copyData not supported by root and streams!" );
+ OSL_FAIL( "copyData not supported by root and streams!" );
return false;
}
@@ -2777,37 +2777,37 @@ bool Content::copyData( const Uri & rSourceUri, const rtl::OUString & rNewName )
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for eny reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( container::NoSuchElementException const & )
{
// there is no element with this name in this storage
- OSL_ENSURE( false, "Caught NoSuchElementException!" );
+ OSL_FAIL( "Caught NoSuchElementException!" );
return false;
}
catch ( container::ElementExistException const & )
{
// there is no element with this name in this storage
- OSL_ENSURE( false, "Caught ElementExistException!" );
+ OSL_FAIL( "Caught ElementExistException!" );
return false;
}
catch ( io::IOException const & )
{
// in case of io errors during renaming
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( embed::StorageWrappedTargetException const & )
{
// wraps other exceptions
- OSL_ENSURE( false, "Caught StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught StorageWrappedTargetException!" );
return false;
}
@@ -2829,12 +2829,12 @@ bool Content::commitStorage( const uno::Reference< embed::XStorage > & xStorage
}
catch ( io::IOException const & )
{
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( lang::WrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
return false;
}
@@ -2855,15 +2855,15 @@ bool Content::closeOutputStream(
}
catch ( io::NotConnectedException const & )
{
- OSL_ENSURE( false, "Caught NotConnectedException!" );
+ OSL_FAIL( "Caught NotConnectedException!" );
}
catch ( io::BufferSizeExceededException const & )
{
- OSL_ENSURE( false, "Caught BufferSizeExceededException!" );
+ OSL_FAIL( "Caught BufferSizeExceededException!" );
}
catch ( io::IOException const & )
{
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
}
}
return false;
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
index bed9e49bcb..877802592c 100644
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
@@ -440,7 +440,7 @@ bool ResultSetDataSupplier::queryNamesOfChildren()
m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(),
*pNamesOfChildren ) )
{
- OSL_ENSURE( false, "Got no list of children!" );
+ OSL_FAIL( "Got no list of children!" );
m_pImpl->m_bThrowException = sal_True;
return false;
}
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index be75f490ff..6d6c914d14 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -118,7 +118,7 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc )
}
catch ( lang::WrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
}
}
@@ -645,11 +645,11 @@ bool OfficeDocumentsManager::isBasicIDE(
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( frame::UnknownModuleException const & )
{
- OSL_ENSURE( false, "Caught UnknownModuleException!" );
+ OSL_FAIL( "Caught UnknownModuleException!" );
}
if ( aModule.getLength() > 0 )
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index cd06aabd82..9d81a77ccd 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -345,11 +345,11 @@ ContentProvider::queryStorage( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -358,7 +358,7 @@ ContentProvider::queryStorage( const rtl::OUString & rUri,
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
}
return uno::Reference< embed::XStorage >();
@@ -384,11 +384,11 @@ ContentProvider::queryStorageClone( const rtl::OUString & rUri ) const
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -397,7 +397,7 @@ ContentProvider::queryStorageClone( const rtl::OUString & rUri ) const
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
}
@@ -418,19 +418,19 @@ ContentProvider::queryInputStream( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
// catch ( packages::WrongPasswordException const & )
// {
@@ -457,11 +457,11 @@ ContentProvider::queryOutputStream( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -470,7 +470,7 @@ ContentProvider::queryOutputStream( const rtl::OUString & rUri,
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
// catch ( packages::WrongPasswordException const & )
// {
@@ -496,11 +496,11 @@ ContentProvider::queryStream( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -509,7 +509,7 @@ ContentProvider::queryStream( const rtl::OUString & rUri,
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
// catch ( packages::WrongPasswordException const & )
// {
@@ -560,11 +560,11 @@ bool ContentProvider::queryNamesOfChildren(
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -573,8 +573,7 @@ bool ContentProvider::queryNamesOfChildren(
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false,
- "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
}
}
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index f9b65886f0..e9f97c2242 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -111,7 +111,7 @@ Storage::Storage( const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "Storage::Storage: Caught exception!" );
+ OSL_FAIL( "Storage::Storage: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
@@ -157,7 +157,7 @@ Storage::~Storage()
}
catch ( ... )
{
- OSL_ENSURE( false, "Storage::~Storage - Caught exception!" );
+ OSL_FAIL( "Storage::~Storage - Caught exception!" );
}
}
}
@@ -620,7 +620,7 @@ OutputStream::OutputStream(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "OutputStream::OutputStream: Caught exception!" );
+ OSL_FAIL( "OutputStream::OutputStream: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
@@ -821,7 +821,7 @@ Stream::Stream(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "OutputStream::OutputStream: Caught exception!" );
+ OSL_FAIL( "OutputStream::OutputStream: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index c94b2f2209..de7fdd1fe4 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -311,8 +311,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri,
// Each stream must have a parent storage.
if ( !xParentStorage.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createOutputStream - "
+ OSL_FAIL( "StorageElementFactory::createOutputStream - "
"Unable to create parent storage!" );
return uno::Reference< io::XOutputStream >();
}
@@ -323,8 +322,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri,
if ( !xStream.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createOutputStream - "
+ OSL_FAIL( "StorageElementFactory::createOutputStream - "
"Unable to create stream!" );
return uno::Reference< io::XOutputStream >();
}
@@ -359,8 +357,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri,
// Each stream must have a parent storage.
if ( !xParentStorage.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createStream - "
+ OSL_FAIL( "StorageElementFactory::createStream - "
"Unable to create parent storage!" );
return uno::Reference< io::XStream >();
}
@@ -371,8 +368,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri,
if ( !xStream.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createStream - "
+ OSL_FAIL( "StorageElementFactory::createStream - "
"Unable to create stream!" );
return uno::Reference< io::XStream >();
}
@@ -502,8 +498,8 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
}
else
{
- OSL_ENSURE(
- false, "Bug! Value of property OpenMode has wrong type!" );
+ OSL_FAIL(
+ "Bug! Value of property OpenMode has wrong type!" );
throw uno::RuntimeException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
@@ -513,7 +509,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
}
catch ( beans::UnknownPropertyException const & e )
{
- OSL_ENSURE( false, "Property OpenMode not supported!" );
+ OSL_FAIL( "Property OpenMode not supported!" );
throw embed::StorageWrappedTargetException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
@@ -523,7 +519,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
}
catch ( lang::WrappedTargetException const & e )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
throw embed::StorageWrappedTargetException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
@@ -643,8 +639,7 @@ StorageElementFactory::queryStream(
break;
default:
- OSL_ENSURE( false,
- "StorageElementFactory::queryStream : Unknown open mode!" );
+ OSL_FAIL( "StorageElementFactory::queryStream : Unknown open mode!" );
throw embed::InvalidStorageException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(