summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
commit3d874bdf409ca4a099853b30aeb9932e45c56f60 (patch)
tree3b88c39fa7cf3aa598a286534afc7de6f4ec98ab /ucbhelper
parent4edacef4f14f1992f8e0cbded5a86730c8353b4d (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/client/content.cxx6
-rw-r--r--ucbhelper/source/client/interceptedinteraction.cxx2
-rw-r--r--ucbhelper/source/client/proxydecider.cxx32
-rw-r--r--ucbhelper/source/provider/cancelcommandexecution.cxx4
-rw-r--r--ucbhelper/source/provider/contenthelper.cxx17
-rw-r--r--ucbhelper/source/provider/propertyvalueset.cxx7
-rw-r--r--ucbhelper/source/provider/simplecertificatevalidationrequest.cxx2
-rw-r--r--ucbhelper/source/provider/simpleinteractionrequest.cxx3
-rw-r--r--ucbhelper/workben/myucp/myucp_content.cxx14
9 files changed, 34 insertions, 53 deletions
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 3592049c95f4..7f73b6492d55 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1533,8 +1533,7 @@ sal_Bool Content::transferContent( const Content& rSourceContent,
ContentBroker* pBroker = ContentBroker::get();
if ( !pBroker )
{
- OSL_ENSURE( sal_False,
- "Content::transferContent - No Content Broker!" );
+ OSL_FAIL( "Content::transferContent - No Content Broker!" );
return sal_False;
}
@@ -1542,8 +1541,7 @@ sal_Bool Content::transferContent( const Content& rSourceContent,
pBroker->getCommandProcessorInterface() );
if ( !xCmdProc.is() )
{
- OSL_ENSURE( sal_False,
- "Content::transferContent - No XCommandProcessor!" );
+ OSL_FAIL( "Content::transferContent - No XCommandProcessor!" );
return sal_False;
}
diff --git a/ucbhelper/source/client/interceptedinteraction.cxx b/ucbhelper/source/client/interceptedinteraction.cxx
index 0556e181c48b..0d774b29c793 100644
--- a/ucbhelper/source/client/interceptedinteraction.cxx
+++ b/ucbhelper/source/client/interceptedinteraction.cxx
@@ -130,7 +130,7 @@ void InterceptedInteraction::impl_handleDefault(const ::com::sun::star::uno::Ref
// Runtime error! The defined continuation could not be located
// inside the set of available containuations of the incoming request.
// Whats wrong - the interception list or the request?
- OSL_ENSURE(sal_False, "InterceptedInteraction::handle()\nCould intercept this interaction request - but cant locate the right continuation!");
+ OSL_FAIL("InterceptedInteraction::handle()\nCould intercept this interaction request - but cant locate the right continuation!");
}
break;
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index beb1b194fac2..4f99baacbb2d 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -260,8 +260,7 @@ bool getConfigStringValue(
if ( !( xNameAccess->getByName( rtl::OUString::createFromAscii( key ) )
>>= value ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
+ OSL_FAIL( "InternetProxyDecider - "
"Error getting config item value!" );
return false;
}
@@ -289,8 +288,7 @@ bool getConfigInt32Value(
rtl::OUString::createFromAscii( key ) );
if ( aValue.hasValue() && !( aValue >>= value ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
+ OSL_FAIL( "InternetProxyDecider - "
"Error getting config item value!" );
return false;
}
@@ -406,7 +404,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
catch ( uno::Exception const & )
{
// createInstance, createInstanceWithArguments
- OSL_ENSURE( sal_False, "InternetProxyDecider - Exception!" );
+ OSL_FAIL( "InternetProxyDecider - Exception!" );
}
}
@@ -603,8 +601,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_nProxyType ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -614,8 +611,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
rtl::OUString aNoProxyList;
if ( !( rElem.Element >>= aNoProxyList ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
@@ -626,8 +622,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpProxy.aName ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -636,8 +631,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpProxy.nPort ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
@@ -649,8 +643,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpsProxy.aName ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -659,8 +652,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpsProxy.nPort ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
@@ -672,8 +664,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aFtpProxy.aName ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -682,8 +673,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aFtpProxy.nPort ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 36694413d0fa..457c1b4e81e7 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -84,7 +84,7 @@ void cancelCommandExecution( const uno::Any & rException,
cppu::throwException( rException );
- OSL_ENSURE( sal_False, "Return from cppu::throwException call!!!" );
+ OSL_FAIL( "Return from cppu::throwException call!!!" );
throw uno::RuntimeException();
}
@@ -122,7 +122,7 @@ void cancelCommandExecution( const ucb::IOErrorCode eError,
cppu::throwException( xRequest->getRequest() );
- OSL_ENSURE( sal_False, "Return from cppu::throwException call!!!" );
+ OSL_FAIL( "Return from cppu::throwException call!!!" );
throw uno::RuntimeException();
}
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index dfb91b4642c2..6a5073750b9a 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -597,20 +597,17 @@ void SAL_CALL ContentImplHelper::addProperty(
}
catch ( beans::PropertyExistException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::addProperty - Exists!" );
+ OSL_FAIL( "ContentImplHelper::addProperty - Exists!" );
throw;
}
catch ( beans::IllegalTypeException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::addProperty - Wrong Type!" );
+ OSL_FAIL( "ContentImplHelper::addProperty - Wrong Type!" );
throw;
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::addProperty - Illegal Arg!" );
+ OSL_FAIL( "ContentImplHelper::addProperty - Illegal Arg!" );
throw;
}
@@ -664,7 +661,7 @@ void SAL_CALL ContentImplHelper::removeProperty( const rtl::OUString& Name )
}
catch ( beans::UnknownPropertyException const & )
{
- OSL_ENSURE( sal_False, "ContentImplHelper::removeProperty - Unknown!" );
+ OSL_FAIL( "ContentImplHelper::removeProperty - Unknown!" );
throw;
}
@@ -692,14 +689,12 @@ void SAL_CALL ContentImplHelper::removeProperty( const rtl::OUString& Name )
}
catch ( beans::UnknownPropertyException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::removeProperty - Unknown!" );
+ OSL_FAIL( "ContentImplHelper::removeProperty - Unknown!" );
throw;
}
catch ( beans::NotRemoveableException const & )
{
- OSL_ENSURE(
- sal_False,
+ OSL_FAIL(
"ContentImplHelper::removeProperty - Unremoveable!" );
throw;
}
diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx
index d73dabd9573c..c6ab550237c1 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -164,7 +164,7 @@ class PropertyValues : public PropertyValuesVector {};
if ( ( columnIndex < 1 ) \
|| ( columnIndex > sal_Int32( m_pValues->size() ) ) ) \
{ \
- OSL_ENSURE( sal_False, "PropertyValueSet - index out of range!" ); \
+ OSL_FAIL( "PropertyValueSet - index out of range!" ); \
} \
else \
{ \
@@ -480,7 +480,7 @@ Any SAL_CALL PropertyValueSet::getObject(
if ( ( columnIndex < 1 )
|| ( columnIndex > sal_Int32( m_pValues->size() ) ) )
{
- OSL_ENSURE( sal_False, "PropertyValueSet - index out of range!" );
+ OSL_FAIL( "PropertyValueSet - index out of range!" );
}
else
{
@@ -577,8 +577,7 @@ Any SAL_CALL PropertyValueSet::getObject(
case OBJECT_VALUE_SET:
// Fall-through is intended!
default:
- OSL_ENSURE( sal_False,
- "PropertyValueSet::getObject - "
+ OSL_FAIL( "PropertyValueSet::getObject - "
"Wrong original type" );
break;
}
diff --git a/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx b/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
index d3a7259d91cb..16946664e518 100644
--- a/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
+++ b/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
@@ -83,7 +83,7 @@ sal_Int32 SimpleCertificateValidationRequest::getResponse() const
if ( xDisapprove.is() )
return 8;
- OSL_ENSURE( sal_False, "CertificateValidationRequest - Unknown continuation!" );
+ OSL_FAIL( "CertificateValidationRequest - Unknown continuation!" );
}
return 0;
}
diff --git a/ucbhelper/source/provider/simpleinteractionrequest.cxx b/ucbhelper/source/provider/simpleinteractionrequest.cxx
index e178b695da15..69e833434b54 100644
--- a/ucbhelper/source/provider/simpleinteractionrequest.cxx
+++ b/ucbhelper/source/provider/simpleinteractionrequest.cxx
@@ -125,8 +125,7 @@ sal_Int32 SimpleInteractionRequest::getResponse() const
if ( xDisapprove.is() )
return CONTINUATION_DISAPPROVE;
- OSL_ENSURE( sal_False,
- "SimpleInteractionRequest::getResponse - Unknown continuation!" );
+ OSL_FAIL( "SimpleInteractionRequest::getResponse - Unknown continuation!" );
}
return CONTINUATION_UNKNOWN;
}
diff --git a/ucbhelper/workben/myucp/myucp_content.cxx b/ucbhelper/workben/myucp/myucp_content.cxx
index 35219355d071..0d24daa3d795 100644
--- a/ucbhelper/workben/myucp/myucp_content.cxx
+++ b/ucbhelper/workben/myucp/myucp_content.cxx
@@ -235,7 +235,7 @@ uno::Any SAL_CALL Content::execute(
uno::Sequence< beans::Property > Properties;
if ( !( aCommand.Argument >>= Properties ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -257,7 +257,7 @@ uno::Any SAL_CALL Content::execute(
uno::Sequence< beans::PropertyValue > aProperties;
if ( !( aCommand.Argument >>= aProperties ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -269,7 +269,7 @@ uno::Any SAL_CALL Content::execute(
if ( !aProperties.getLength() )
{
- OSL_ENSURE( sal_False, "No properties!" );
+ OSL_FAIL( "No properties!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -308,7 +308,7 @@ uno::Any SAL_CALL Content::execute(
ucb::OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -403,7 +403,7 @@ uno::Any SAL_CALL Content::execute(
ucb::InsertCommandArgument arg;
if ( !( aCommand.Argument >>= arg ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -442,7 +442,7 @@ uno::Any SAL_CALL Content::execute(
// Unsupported command
//////////////////////////////////////////////////////////////////
- OSL_ENSURE( sal_False, "Content::execute - unsupported command!" );
+ OSL_FAIL( "Content::execute - unsupported command!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
@@ -867,7 +867,7 @@ void Content::insert(
bool bNeedInputStream = true; // @@@ adjust to real requirements
if ( bNeedInputStream && !xInputStream.is() )
{
- OSL_ENSURE( sal_False, "Content::insert - No data stream!" );
+ OSL_FAIL( "Content::insert - No data stream!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingInputStreamException(