summaryrefslogtreecommitdiffstats
path: root/connectivity
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 12:08:22 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-13 16:50:43 +0100
commit6495f3945ec0dd4cef37b8dfd5217562de4a3269 (patch)
tree8547adeed9ab7d2452d7efbe0c5cad284930695f /connectivity
parentMove OSL_ENSURE(false,...) to OSL_FAIL(...) (diff)
downloadcore-6495f3945ec0dd4cef37b8dfd5217562de4a3269.tar.gz
core-6495f3945ec0dd4cef37b8dfd5217562de4a3269.zip
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/inc/connectivity/DateConversion.hxx20
-rw-r--r--connectivity/source/commontools/DateConversion.cxx2
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/commontools/FValue.cxx8
-rw-r--r--connectivity/source/commontools/TSkipDeletedSet.cxx2
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx2
-rw-r--r--connectivity/source/commontools/dbtools.cxx6
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx2
-rw-r--r--connectivity/source/drivers/adabas/BDriver.cxx2
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx4
-rw-r--r--connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/drivers/ado/adoimp.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NServices.cxx2
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx2
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FDateFunctions.cxx4
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageAccess.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx8
-rw-r--r--connectivity/source/drivers/hsqldb/StorageFileAccess.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx6
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx2
-rw-r--r--connectivity/source/drivers/kab/KDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/odbc/ORealDriver.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx2
-rw-r--r--connectivity/source/inc/ado/Aolewrap.hxx2
-rw-r--r--connectivity/source/parse/sqlnode.cxx4
-rw-r--r--connectivity/source/sdbcx/VCatalog.cxx2
35 files changed, 66 insertions, 66 deletions
diff --git a/connectivity/inc/connectivity/DateConversion.hxx b/connectivity/inc/connectivity/DateConversion.hxx
index cbab67251e4a..45afacfdbe68 100644
--- a/connectivity/inc/connectivity/DateConversion.hxx
+++ b/connectivity/inc/connectivity/DateConversion.hxx
@@ -41,52 +41,52 @@ namespace connectivity
public:
static sal_Int32 toINT32(const ::com::sun::star::util::Date&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static sal_Int32 toINT32(const ::com::sun::star::util::Time&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static sal_Int64 toINT64(const ::com::sun::star::util::DateTime&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static sal_Int32 getMsFromTime(const ::com::sun::star::util::Time&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static double toDouble(const ::com::sun::star::util::Date&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static double toDouble(const ::com::sun::star::util::Time&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static double toDouble(const ::com::sun::star::util::DateTime&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static ::com::sun::star::util::Date toDate(double,const ::com::sun::star::util::Date& =::com::sun::star::util::Date(01,01,1900))
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return ::com::sun::star::util::Date();
}
static ::com::sun::star::util::Time toTime(double)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return ::com::sun::star::util::Time();
}
static ::com::sun::star::util::DateTime toDateTime(double,const ::com::sun::star::util::Date& =::com::sun::star::util::Date(01,01,1900))
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return ::com::sun::star::util::DateTime();
}
};
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 531df746045f..73f77f85cc6d 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -216,7 +216,7 @@ using namespace ::com::sun::star::beans;
}
catch ( const Exception& )
{
- OSL_ENSURE(0,"TypeConversion Error");
+ OSL_FAIL("TypeConversion Error");
}
}
else
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index ad915996e1e7..9aa8d14fd8c4 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -121,7 +121,7 @@ void ODatabaseMetaDataResultSet::setType(MetaDataResultSetType _eType)
case eBestRowIdentifier: setBestRowIdentifierMap(); break;
case eVersionColumns: setVersionColumnsMap(); break;
default:
- OSL_ENSURE(0,"Wrong type!");
+ OSL_FAIL("Wrong type!");
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index c33ad7ff312c..ddcafc06fc91 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -260,7 +260,7 @@ void ORowSetValue::setTypeKind(sal_Int32 _eType)
break;
default:
(*this) = getAny();
- OSL_ENSURE(0,"ORowSetValue:operator==(): UNSPUPPORTED TYPE!");
+ OSL_FAIL("ORowSetValue:operator==(): UNSPUPPORTED TYPE!");
}
}
@@ -865,7 +865,7 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
break;
default:
bRet = false;
- OSL_ENSURE(0,"ORowSetValue::operator==(): UNSPUPPORTED TYPE!");
+ OSL_FAIL("ORowSetValue::operator==(): UNSPUPPORTED TYPE!");
break;
}
return bRet;
@@ -958,7 +958,7 @@ Any ORowSetValue::makeAny() const
}
break;
default:
- OSL_ENSURE(0,"ORowSetValue::makeAny(): UNSPUPPORTED TYPE!");
+ OSL_FAIL("ORowSetValue::makeAny(): UNSPUPPORTED TYPE!");
rValue = getAny();
break;
}
@@ -2326,7 +2326,7 @@ void ORowSetValue::fill(const Any& _rValue)
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
break;
}
}
diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx
index 99d89b83109d..ab4b1c6f4071 100644
--- a/connectivity/source/commontools/TSkipDeletedSet.cxx
+++ b/connectivity/source/commontools/TSkipDeletedSet.cxx
@@ -247,7 +247,7 @@ sal_Int32 OSkipDeletedSet::getMappedPosition(sal_Int32 _nPos) const
/*TInt2IntMap::const_iterator aFind = m_aBookmarks.find(_nPos);
OSL_ENSURE(aFind != m_aBookmarks.end(),"OSkipDeletedSet::getMappedPosition() invalid bookmark!");
return aFind->second;*/
- OSL_ENSURE(0,"Why!");
+ OSL_FAIL("Why!");
return -1;
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 6a8161da314b..f0259e0de5f1 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -589,7 +589,7 @@ sdbcx::TKeyProperties OTableHelper::getKeyProperties(const ::rtl::OUString& _sNa
}
else // only a fall back
{
- OSL_ENSURE(0,"No key with the given name found");
+ OSL_FAIL("No key with the given name found");
pKeyProps.reset(new sdbcx::KeyProperties());
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index a0e8534cd60d..f78135404fe8 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -499,7 +499,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
}
catch(Exception&)
{
- OSL_ENSURE(0,"EXception when we set the new active connection!");
+ OSL_FAIL("EXception when we set the new active connection!");
}
}
}
@@ -1546,12 +1546,12 @@ void showError(const SQLExceptionInfo& _rInfo,
xErrorDialog->execute();
else
{
- OSL_ENSURE(0,"dbtools::showError: no XExecutableDialog found!");
+ OSL_FAIL("dbtools::showError: no XExecutableDialog found!");
}
}
catch(Exception&)
{
- OSL_ENSURE(0,"showError: could not display the error message!");
+ OSL_FAIL("showError: could not display the error message!");
}
}
}
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 21b17eeec624..6288a543d241 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -763,7 +763,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
Privilege::INSERT |
Privilege::SELECT;
else
- OSL_ENSURE(0,"Could not collect the privileges !");
+ OSL_FAIL("Could not collect the privileges !");
}
return nPrivileges;
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 9ebdd3f08272..97f3eeee6a0c 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -512,7 +512,7 @@ void SAL_CALL OPoolCollection::disposing( const EventObject& Source ) throw (Run
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception caught");
+ OSL_FAIL("Exception caught");
}
}
}
diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx
index 810b519e28b1..490add2af720 100644
--- a/connectivity/source/drivers/adabas/BDriver.cxx
+++ b/connectivity/source/drivers/adabas/BDriver.cxx
@@ -823,7 +823,7 @@ oslGenericFunction ODriver::getOdbcFunction(sal_Int32 _nIndex) const
pFunction = (oslGenericFunction)pODBC3SQLNativeSql;
break;
default:
- OSL_ENSURE(0,"Function unknown!");
+ OSL_FAIL("Function unknown!");
}
return pFunction;
}
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 37fb4f981240..a5bb2c190186 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -355,7 +355,7 @@ void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLE
eIso = adXactSerializable;
break;
default:
- OSL_ENSURE(0,"OConnection::setTransactionIsolation invalid level");
+ OSL_FAIL("OConnection::setTransactionIsolation invalid level");
return;
}
m_pAdoConnection->put_IsolationLevel(eIso);
@@ -387,7 +387,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException,
nRet = TransactionIsolation::SERIALIZABLE;
break;
default:
- OSL_ENSURE(0,"OConnection::setTransactionIsolation invalid level");
+ OSL_FAIL("OConnection::setTransactionIsolation invalid level");
}
ADOS::ThrowException(*m_pAdoConnection,*this);
return nRet;
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index 589fd04f6675..0290e29cbfef 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -763,7 +763,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast(
throw Exception();
break;
default:
- OSL_ENSURE(0,"setFastPropertyValue_NoBroadcast: Illegal handle value!");
+ OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx
index c6df59087faf..9f8c0afb96b3 100644
--- a/connectivity/source/drivers/ado/adoimp.cxx
+++ b/connectivity/source/drivers/ado/adoimp.cxx
@@ -132,7 +132,7 @@ sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType)
case adVariant:
nType = DataType::OTHER; break;
default:
- OSL_ENSURE(0,"MapADOType2Jdbc: Unknown Type!");
+ OSL_FAIL("MapADOType2Jdbc: Unknown Type!");
;
}
return nType;
@@ -164,7 +164,7 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine)
case DataType::TINYINT: return isJetEngine(_nJetEngine) ? adUnsignedTinyInt : adTinyInt;break;
case DataType::OBJECT: return adGUID; break;
default:
- OSL_ENSURE(0,"MapJdbc2ADOType: Unknown Type!");
+ OSL_FAIL("MapJdbc2ADOType: Unknown Type!");
;
}
return adEmpty;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 8b29547057bb..a37214e80a6c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2278,7 +2278,7 @@ void ODbaseTable::alterColumn(sal_Int32 index,
}
catch(const Exception&)
{
- OSL_ENSURE(0,"ODbaseTable::alterColumn: Exception occurred!");
+ OSL_FAIL("ODbaseTable::alterColumn: Exception occurred!");
throw;
}
}
diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx
index 9e5b83d8736e..4d2f3b8ec899 100644
--- a/connectivity/source/drivers/evoab2/NServices.cxx
+++ b/connectivity/source/drivers/evoab2/NServices.cxx
@@ -101,7 +101,7 @@ struct ProviderRequest
}
catch(::com::sun::star::uno::Exception)
{
- OSL_ENSURE(0,"Service Creation Exception");
+ OSL_FAIL("Service Creation Exception");
}
return xRet.is();
}
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 2626c1d29a30..aa5a5108c7d5 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -198,7 +198,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
else
{
- OSL_ENSURE(0,"OConnection::construct: ::ucbhelper::Content isn't a folde nor a document! How that?!");
+ OSL_FAIL("OConnection::construct: ::ucbhelper::Content isn't a folde nor a document! How that?!");
throw SQLException();
}
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index cd738291e1a5..4a98491450ba 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -89,7 +89,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
const ::rtl::OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getColumns" );
- OSL_ENSURE(0,"Should be overloaded!");
+ OSL_FAIL("Should be overloaded!");
return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumns );
}
diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx
index 792cb2d8bddb..a6be589f5328 100644
--- a/connectivity/source/drivers/file/FDateFunctions.cxx
+++ b/connectivity/source/drivers/file/FDateFunctions.cxx
@@ -70,7 +70,7 @@ ORowSetValue OOp_DayOfWeek::operate(const ORowSetValue& lhs) const
nRet = 1;
break;
default:
- OSL_ENSURE(0,"Error in enum values for date");
+ OSL_FAIL("Error in enum values for date");
}
return nRet;
}
@@ -136,7 +136,7 @@ ORowSetValue OOp_DayName::operate(const ORowSetValue& lhs) const
sRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sunday"));
break;
default:
- OSL_ENSURE(0,"Error in enum values for date");
+ OSL_FAIL("Error in enum values for date");
}
return sRet;
}
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index f0683987eaa9..fd04c467c690 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -251,7 +251,7 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns
if (IS_TYPE(OOperandResult,pOperand))
delete pOperand;
else
- OSL_ENSURE(0,"Illegal here!");
+ OSL_FAIL("Illegal here!");
rParameterColumns = aNewParamColumns;
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index d008cedfba08..f4a87d0ba1a1 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -471,7 +471,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
}
catch(Exception &)
{
- OSL_ENSURE(0,"OPredicateCompiler::execute_Operand Exception");
+ OSL_FAIL("OPredicateCompiler::execute_Operand Exception");
}
}
else if (SQL_ISRULE(pPredicateNode,parameter))
@@ -778,7 +778,7 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
pOperator = new OOp_Second();
break;
default:
- OSL_ENSURE(0,"Error in switch!");
+ OSL_FAIL("Error in switch!");
}
break;
case SQL_TOKEN_CHAR:
@@ -866,7 +866,7 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
pOperator = new OOp_Week();
break;
default:
- OSL_ENSURE(0,"Error in switch!");
+ OSL_FAIL("Error in switch!");
}
}
break;
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 1ce47beb572f..cefec2c3ee08 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -443,7 +443,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
if (JNI_FALSE != env->ExceptionCheck())
{
env->ExceptionClear();
- OSL_ENSURE(0,"ExceptionClear");
+ OSL_FAIL("ExceptionClear");
}
OSL_ENSURE(buf,"buf is NULL");
if ( buf && len > 0 && len <= env->GetArrayLength(buffer))
@@ -466,7 +466,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception caught! : write [BII)V");
+ OSL_FAIL("Exception caught! : write [BII)V");
StorageContainer::throwJavaException(e,env);
}
}
@@ -525,7 +525,7 @@ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, j
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : writeBytes(aData);");
+ OSL_FAIL("Exception catched! : writeBytes(aData);");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 2c99cc3a50b8..67daadd3515a 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -85,7 +85,7 @@ namespace connectivity
catch(const Exception& e)
{
OSL_UNUSED( e );
- OSL_ENSURE(0,"Could not dispose OutputStream");
+ OSL_FAIL("Could not dispose OutputStream");
}
m_xOutputStream.clear();
}
@@ -93,7 +93,7 @@ namespace connectivity
catch(Exception& ex)
{
OSL_UNUSED( ex );
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
}
// -----------------------------------------------------------------------------
@@ -158,7 +158,7 @@ namespace connectivity
if (JNI_FALSE != env->ExceptionCheck())
{
env->ExceptionClear();
- OSL_ENSURE(0,"ExceptionClear");
+ OSL_FAIL("ExceptionClear");
}
::rtl::OUString aStr;
if ( jstr )
@@ -175,7 +175,7 @@ namespace connectivity
if (JNI_FALSE != env->ExceptionCheck())
{
env->ExceptionClear();
- OSL_ENSURE(0,"ExceptionClear");
+ OSL_FAIL("ExceptionClear");
}
return aStr;
}
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index 5a51e6d9bb7f..9bd28fa0b0d4 100644
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
@@ -91,7 +91,7 @@ SAL_DLLPUBLIC_EXPORT jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Storag
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement");
+ OSL_FAIL("Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement");
if (JNI_FALSE != env->ExceptionCheck())
env->ExceptionClear();
::rtl::OString cstr( ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
@@ -130,7 +130,7 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFil
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement");
+ OSL_FAIL("Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement");
StorageContainer::throwJavaException(e,env);
}
}
@@ -173,7 +173,7 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFil
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement");
+ OSL_FAIL("Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index b9b78a675936..28711c7bf277 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -191,7 +191,7 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNa
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : skip();");
+ OSL_FAIL("Exception catched! : skip();");
StorageContainer::throwJavaException(e,env);
}
}
@@ -234,7 +234,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception caught! : available();");
+ OSL_FAIL("Exception caught! : available();");
StorageContainer::throwJavaException(e,env);
}
}
@@ -278,7 +278,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : skip();");
+ OSL_FAIL("Exception catched! : skip();");
StorageContainer::throwJavaException(e,env);
}
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 09e28dbac4c1..a2d9d453f20a 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -865,7 +865,7 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c
void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateNumericObject" );
- // OSL_ENSURE(0,"java_sql_ResultSet::updateNumericObject: NYI");
+ // OSL_FAIL("java_sql_ResultSet::updateNumericObject: NYI");
try
{
SDBThreadAttach t;
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index e27ce35bce04..870b46ed3546 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -1075,7 +1075,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference(
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getUDTs( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException)
{
- OSL_ENSURE(0,"Not implemented yet!");
+ OSL_FAIL("Not implemented yet!");
throw SQLException();
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index 896a5ca04c91..dcb776b6d3c2 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -1119,7 +1119,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference(
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getUDTs( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException)
{
- OSL_ENSURE(0,"Not implemented yet!");
+ OSL_FAIL("Not implemented yet!");
throw SQLException();
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx
index 1bca9cccc78a..c786df3e9b89 100644
--- a/connectivity/source/drivers/odbc/ORealDriver.cxx
+++ b/connectivity/source/drivers/odbc/ORealDriver.cxx
@@ -330,7 +330,7 @@ oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const
pFunction = (oslGenericFunction)pODBC3SQLNativeSql;
break;
default:
- OSL_ENSURE(0,"Function unknown!");
+ OSL_FAIL("Function unknown!");
}
return pFunction;
}
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 8d880caa534f..55f7548d5f70 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -795,7 +795,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHa
case PROPERTY_ID_FETCHSIZE:
throw Exception();
default:
- OSL_ENSURE(0,"setFastPropertyValue_NoBroadcast: Illegal handle value!");
+ OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index e93a465cea3b..e789f4bd111b 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -320,7 +320,7 @@ TVoidPtr OResultSet::allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex)
aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new sal_Int8[m_aRow[_nColumnIndex].getSequence().getLength()]),_nType);
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
aPair = TVoidPtr(0,_nType);
}
return aPair;
@@ -1605,7 +1605,7 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32
if ( aIter->second == _nOffset )
return moveToBookmark(makeAny(aIter->first));
}
- OSL_ENSURE(0,"Bookmark not found!");
+ OSL_FAIL("Bookmark not found!");
}
return sal_False;
}
@@ -1740,7 +1740,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
break;
}
default:
- OSL_ENSURE(0,"Not supported at the moment!");
+ OSL_FAIL("Not supported at the moment!");
}
nRet = N3SQLParamData(m_aStatementHandle,&pColumnIndex);
}
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 51689b44e2b5..f6d6a78323b2 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -64,7 +64,7 @@ using namespace ::comphelper;
} \
catch(SQLException&) \
{ \
- OSL_ENSURE(0,"Exception in odbc catched"); \
+ OSL_FAIL("Exception in odbc catched"); \
}
#endif
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 8ae72766fc04..d9eb8647d485 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -433,7 +433,7 @@ void OTools::ThrowException(OConnection* _pConnection,
case SQL_ERROR: break;
- case SQL_INVALID_HANDLE: OSL_ENSURE(0,"SdbODBC3_SetStatus: SQL_INVALID_HANDLE");
+ case SQL_INVALID_HANDLE: OSL_FAIL("SdbODBC3_SetStatus: SQL_INVALID_HANDLE");
throw SQLException();
}
diff --git a/connectivity/source/inc/ado/Aolewrap.hxx b/connectivity/source/inc/ado/Aolewrap.hxx
index 79371befcb7f..46dcf18668e6 100644
--- a/connectivity/source/inc/ado/Aolewrap.hxx
+++ b/connectivity/source/inc/ado/Aolewrap.hxx
@@ -190,7 +190,7 @@ namespace connectivity
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTemp("Unknown Item: ");
sTemp += ::rtl::OString(sStr.getStr(),sStr.getLength(),osl_getThreadTextEncoding());
- OSL_ENSURE(0,sTemp);
+ OSL_FAIL(sTemp);
#endif
}
else
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 9ccad33c6c4a..742e059617b6 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -775,7 +775,7 @@ sal_Bool OSQLParseNode::getTableComponents(const OSQLParseNode* _pTableNode,
}
else
{
- OSL_ENSURE(0,"Error in parse tree!");
+ OSL_FAIL("Error in parse tree!");
}
}
return _rTable.getLength() != 0;
@@ -1216,7 +1216,7 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
}
catch ( Exception& )
{
- OSL_ENSURE(0,"DateFormatKey");
+ OSL_FAIL("DateFormatKey");
}
}
diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx
index f49c9e4fdbeb..8ea37b7cb216 100644
--- a/connectivity/source/sdbcx/VCatalog.cxx
+++ b/connectivity/source/sdbcx/VCatalog.cxx
@@ -61,7 +61,7 @@ OCatalog::OCatalog(const Reference< XConnection> &_xConnection) : OCatalog_BASE(
}
catch(const Exception&)
{
- OSL_ENSURE(0,"No Metadata available!");
+ OSL_FAIL("No Metadata available!");
}
}
//-----------------------------------------------------------------------------