summaryrefslogtreecommitdiff
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
parent1f6580e985d5c3aa0f3161dd884e71a673e7a0b1 (diff)
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
-rw-r--r--basic/source/uno/dlgcont.cxx8
-rw-r--r--basic/source/uno/namecont.cxx28
-rw-r--r--basic/source/uno/scriptcont.cxx6
-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
-rw-r--r--desktop/source/app/app.cxx6
-rw-r--r--desktop/source/app/check_ext_deps.cxx4
-rw-r--r--desktop/source/deployment/dp_log.cxx4
-rw-r--r--desktop/source/deployment/dp_persmap.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx4
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx6
-rw-r--r--desktop/source/deployment/manager/dp_managerfac.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx6
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx2
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx10
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx2
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx12
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx2
-rw-r--r--sfx2/source/dialog/mailmodelapi.cxx4
-rw-r--r--sfx2/source/view/frame.cxx2
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/table/tabledesign.cxx12
-rw-r--r--ucb/source/ucp/expand/ucpexpand.cxx4
-rw-r--r--ucb/source/ucp/odma/odma_content.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx6
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx48
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx2
-rw-r--r--xmlscript/test/imexp.cxx8
71 files changed, 179 insertions, 179 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 6af1675b9175..52f241890127 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -349,7 +349,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
//Reference< XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory() );
//if( !xMSF.is() )
//{
- // OSL_ENSURE( 0, "### couln't get ProcessServiceFactory\n" );
+ // OSL_FAIL( "### couln't get ProcessServiceFactory\n" );
// return aRetAny;
//}
@@ -357,7 +357,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return aRetAny;
}
@@ -365,7 +365,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
if( !xDialogModel.is() )
{
- OSL_ENSURE( 0, "### couln't create com.sun.star.awt.UnoControlDialogModel component\n" );
+ OSL_FAIL( "### couln't create com.sun.star.awt.UnoControlDialogModel component\n" );
return aRetAny;
}
@@ -409,7 +409,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
}
catch( Exception& )
{
- OSL_ENSURE( 0, "Parsing error\n" );
+ OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile );
ULONG nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 9c65b6a5f2b8..48f8169d71d3 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -341,21 +341,21 @@ SfxLibraryContainer::SfxLibraryContainer( void )
mxMSF = comphelper::getProcessServiceFactory();
if( !mxMSF.is() )
{
- OSL_ENSURE( 0, "### couln't get ProcessServiceFactory\n" );
+ OSL_FAIL( "### couln't get ProcessServiceFactory\n" );
}
mxSFI = Reference< XSimpleFileAccess >( mxMSF->createInstance
( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), UNO_QUERY );
if( !mxSFI.is() )
{
- OSL_ENSURE( 0, "### couln't create SimpleFileAccess component\n" );
+ OSL_FAIL( "### couln't create SimpleFileAccess component\n" );
}
mxStringSubstitution = Reference< XStringSubstitution >( mxMSF->createInstance
( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution")) ), UNO_QUERY );
if( !mxStringSubstitution.is() )
{
- OSL_ENSURE( 0, "### couln't create PathSubstitution component\n" );
+ OSL_FAIL( "### couln't create PathSubstitution component\n" );
}
}
@@ -630,7 +630,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return sal_False;
}
@@ -785,13 +785,13 @@ sal_Bool SfxLibraryContainer::init_Impl(
catch ( xml::sax::SAXException& e )
{
(void) e; // avoid warning
- OSL_ENSURE( 0, OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
return sal_False;
}
catch ( io::IOException& e )
{
(void) e; // avoid warning
- OSL_ENSURE( 0, OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
return sal_False;
}
@@ -896,7 +896,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
sal_Bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
if( bLoaded && aLibName != rLib.aName )
{
- OSL_ENSURE( 0, "Different library names in library"
+ OSL_FAIL( "Different library names in library"
" container and library info files!\n" );
}
if( GbMigrationSuppressErrors && !bLoaded )
@@ -1521,7 +1521,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -1607,7 +1607,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
}
if( !xOut.is() )
{
- OSL_ENSURE( 0, "### couln't open output stream\n" );
+ OSL_FAIL( "### couln't open output stream\n" );
return;
}
@@ -1625,7 +1625,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return sal_False;
}
@@ -1683,7 +1683,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
if( !xInput.is() )
{
- // OSL_ENSURE( 0, "### couln't open input stream\n" );
+ // OSL_FAIL( "### couln't open input stream\n" );
return sal_False;
}
@@ -1698,7 +1698,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
catch( Exception& )
{
- OSL_ENSURE( 0, "Parsing error\n" );
+ OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
ULONG nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
@@ -1998,7 +1998,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -2058,7 +2058,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
}
if( !xOut.is() )
{
- OSL_ENSURE( 0, "### couln't open output stream\n" );
+ OSL_FAIL( "### couln't open output stream\n" );
return;
}
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index d6bd191cd0da..e1b4cf40459b 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -198,7 +198,7 @@ void SAL_CALL SfxScriptLibraryContainer::writeLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -255,7 +255,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return aRetAny;
}
@@ -943,7 +943,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
}
catch( uno::Exception& )
{
- OSL_ENSURE( 0, "### couln't open sub storage for library\n" );
+ OSL_FAIL( "### couln't open sub storage for library\n" );
return sal_False;
}
}
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!");
}
}
//-----------------------------------------------------------------------------
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 996fc6cf36ef..d3ae55b96d07 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -464,7 +464,7 @@ static bool needsSynchronization(
}
else if (err1 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access lastsynchronized in user layer");
+ OSL_FAIL("Cannot access lastsynchronized in user layer");
return true; //sync just in case
}
@@ -478,7 +478,7 @@ static bool needsSynchronization(
}
else if (err2 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access file lastsynchronized in base layer");
+ OSL_FAIL("Cannot access file lastsynchronized in base layer");
return true; //sync just in case
}
@@ -674,7 +674,7 @@ void Desktop::Init()
// We need to have service factory before going further.
if( !::comphelper::getProcessServiceFactory().is())
{
- OSL_ENSURE(0, "Service factory should have been crated in soffice_main().");
+ OSL_FAIL("Service factory should have been crated in soffice_main().");
SetBootstrapError( BE_UNO_SERVICEMANAGER );
}
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 20bad6f4504a..54adffc91faf 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -254,7 +254,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
if ( !xExtensionManager.is() )
{
- OSL_ENSURE( 0, "Could not get the Extension Manager!" );
+ OSL_FAIL( "Could not get the Extension Manager!" );
return true;
}
@@ -301,7 +301,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
catch ( uno::RuntimeException & ) { throw; }
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
if ( bRegistered )
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index 0fc8b08a15b7..24a8b7b40c0d 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -89,7 +89,7 @@ void ProgressLogImpl::disposing()
}
catch (Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -153,7 +153,7 @@ void ProgressLogImpl::log_write( OString const & text )
}
catch (io::IOException & exc) {
(void) exc;
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index 78d4a64d3242..92e4080063f9 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -61,7 +61,7 @@ void PersistentMap::throw_rtexc( int err, char const * pmsg ) const
buf.append( OUString( msg.getStr(), msg.getLength(),
osl_getThreadTextEncoding() ) );
const OUString msg_(buf.makeStringAndClear());
- OSL_ENSURE( 0, rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
msg_, RTL_TEXTENCODING_UTF8 ).getStr() );
throw RuntimeException( msg_, Reference<XInterface>() );
}
@@ -74,7 +74,7 @@ PersistentMap::~PersistentMap()
}
catch (DbException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, DbEnv::strerror( exc.get_errno() ) );
+ OSL_FAIL( DbEnv::strerror( exc.get_errno() ) );
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 3790f273c305..f20128419d05 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -929,7 +929,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
xFilterManager->appendFilter( iPos->first, iPos->second );
}
catch (lang::IllegalArgumentException & exc) {
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
(void) exc;
}
@@ -957,7 +957,7 @@ IMPL_LINK( ExtMgrDialog, HandleCancelBtn, void*, EMPTYARG )
}
catch ( uno::RuntimeException & )
{
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
}
}
return 1;
@@ -1372,7 +1372,7 @@ IMPL_LINK( UpdateRequiredDialog, HandleCancelBtn, void*, EMPTYARG )
}
catch ( uno::RuntimeException & )
{
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
}
}
return 1;
@@ -1680,7 +1680,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
catch ( uno::RuntimeException & ) { throw; }
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
bRegistered = false;
}
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index a5f3dc60cfa0..84f3e0ec6444 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -894,7 +894,7 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv
OUString sName;
if ( ! (anyTitle >>= sName) )
{
- OSL_ENSURE(0, "Could not get file name for extension.");
+ OSL_FAIL("Could not get file name for extension.");
return;
}
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 134593a7e5eb..67e40eec650c 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -985,7 +985,7 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &
}
else if ( !m_bInCheckMode )
{
- OSL_ENSURE( 0, "ExtensionBox_Impl::addEntry(): Will not add duplicate entries" );
+ OSL_FAIL( "ExtensionBox_Impl::addEntry(): Will not add duplicate entries" );
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index cac4ae05f65e..429b855ab426 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -361,7 +361,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
}
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return NOT_AVAILABLE;
}
}
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 1b84fea78f77..c108565a6eb9 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1297,7 +1297,7 @@ sal_Bool ExtensionManager::synchronize(
{
//We catch the exception, so we can write the lastmodified file
//so we will no repeat this everytime OOo starts.
- OSL_ENSURE(0, "Extensions Manager: synchronize");
+ OSL_FAIL("Extensions Manager: synchronize");
}
OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM(
"$BUNDLED_EXTENSIONS_USER/lastsynchronized"));
@@ -1455,7 +1455,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 8021efe9dd3c..d2cb75089e76 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -383,7 +383,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index c75cb6375643..60342b48d94d 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -603,7 +603,7 @@ OUString PackageManagerImpl::detectMediaType(
if (throw_exc)
throw;
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1076,13 +1076,13 @@ PackageManagerImpl::getDeployedPackages_(
catch (lang::IllegalArgumentException & exc) {
// ignore
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (deployment::DeploymentException& exc) {
// ignore
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index cb2f3b7f4387..d84abbf0f926 100644
--- a/desktop/source/deployment/manager/dp_managerfac.cxx
+++ b/desktop/source/deployment/manager/dp_managerfac.cxx
@@ -99,7 +99,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index ba7952364663..1a46cdda3d5a 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -160,7 +160,7 @@ bool compareExtensionFolderWithLastSynchronizedFile(
}
else if (err1 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access extension folder");
+ OSL_FAIL("Cannot access extension folder");
return true; //sync just in case
}
@@ -174,7 +174,7 @@ bool compareExtensionFolderWithLastSynchronizedFile(
}
else if (err2 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access file lastsynchronized");
+ OSL_FAIL("Cannot access file lastsynchronized");
return true; //sync just in case
}
@@ -389,7 +389,7 @@ bool office_is_running()
}
else
{
- OSL_ENSURE(0, "NOT osl_Process_E_None ");
+ OSL_FAIL("NOT osl_Process_E_None ");
//if osl_getExecutable file than we take the risk of creating a pipe
ret = existsOfficePipe();
}
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index eefe9282c69d..d191dd680aa0 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -202,7 +202,7 @@ namespace
ret = checkOSandCPU(OUSTR("DragonFly"), OUSTR("X86_64"));
else
{
- OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. "
+ OSL_FAIL("Extension Manager: The extension supports an unknown platform. "
"Check the platform element in the description.xml");
ret = false;
}
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index b09b31e74961..ee88a52055ec 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1340,7 +1340,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
xSet->insert( Any(xFactory) );
} // ignore if factory has already been inserted:
catch (container::ElementExistException &) {
- OSL_ENSURE( 0, "### factory already registered?" );
+ OSL_FAIL( "### factory already registered?" );
}
}
@@ -1375,8 +1375,8 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
xRootContext->insertByName( name, Any() );
} catch (container::ElementExistException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE(
- 0, OUStringToOString(
+ OSL_FAIL(
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
xRootContext->replaceByName( name, Any() );
}
@@ -1460,8 +1460,8 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
}
catch (container::NoSuchElementException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE(
- 0, OUStringToOString(
+ OSL_FAIL(
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 3550f6291744..9e126f9a7d5e 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -669,7 +669,7 @@ void Package::processPackage_impl(
}
}
catch (RuntimeException &) {
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
throw;
}
catch (CommandFailedException &) {
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 2c7cb4c2168d..c90eb78a51a4 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -279,7 +279,7 @@ void PackageRegistryImpl::insertBackend(
xBackend, UNO_QUERY_THROW )->
getImplementationName() );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
buf.makeStringAndClear(),
RTL_TEXTENCODING_UTF8 ) );
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 2b9188dba835..511cd8a906e4 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -897,7 +897,7 @@ void BackendImpl::PackageImpl::processPackage_(
}
catch (Exception &)
{
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -988,7 +988,7 @@ OUString BackendImpl::PackageImpl::getDescription()
}
catch ( css::deployment::DeploymentException& )
{
- OSL_ENSURE( 0, ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1091,14 +1091,14 @@ void BackendImpl::PackageImpl::exportTo(
}
// xxx todo: think about exception specs:
catch (deployment::DeploymentException &) {
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (lang::IllegalArgumentException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -1167,7 +1167,7 @@ void BackendImpl::PackageImpl::exportTo(
makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ),
xCmdEnv, false ) )
{
- OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" );
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
@@ -1391,7 +1391,7 @@ void BackendImpl::PackageImpl::scanBundle(
makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ),
xCmdEnv, false /* no throw */ ))
{
- OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" );
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 05c359c500a0..95d870139e03 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -344,7 +344,7 @@ void JavaMigration::migrateJavarc()
{
if (jfw_setSelectedJRE(aInfo) != JFW_E_NONE)
{
- OSL_ENSURE(0, "[Service implementation " IMPL_NAME
+ OSL_FAIL("[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");
fprintf(stderr, "\nCannot migrate Java. An error occurred.\n");
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 09ad55cac8e4..f39364ae4dd9 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -155,7 +155,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
}
catch (RuntimeException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, osl_getThreadTextEncoding() ).getStr() );
}
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 041e66ac963f..5b274017c5b9 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -105,7 +105,7 @@ OptionInfo const * getOptionInfo(
}
}
}
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
opt, osl_getThreadTextEncoding() ).getStr() );
return 0;
}
diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx
index 1a7b5b598e8d..1dbd06987707 100644
--- a/sfx2/source/dialog/mailmodelapi.cxx
+++ b/sfx2/source/dialog/mailmodelapi.cxx
@@ -392,7 +392,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
return eRet;
@@ -453,7 +453,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAt
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
return eRet;
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 428ee5f9d114..a4c65ca94eca 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -874,7 +874,7 @@ void SfxFrame::CreateWorkWindow_Impl()
}
catch(Exception&)
{
- OSL_ENSURE(0,"SfxFrame::CreateWorkWindow_Impl: Exception cachted. Please try to submit a repoducable bug !");
+ OSL_FAIL("SfxFrame::CreateWorkWindow_Impl: Exception cachted. Please try to submit a repoducable bug !");
}
}
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index f3c9645c43d1..eaababd114fa 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1207,7 +1207,7 @@ void FmGridControl::DeleteSelectedRows()
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception caught while deleting rows!");
+ OSL_FAIL("Exception caught while deleting rows!");
}
// An den DatenCursor anpassen
AdjustDataSource(sal_True);
@@ -2120,7 +2120,7 @@ void FmGridControl::KeyInput( const KeyEvent& rKEvt )
}
catch(const Exception&)
{
- OSL_ENSURE(0,"exception occurred while deleting a column");
+ OSL_FAIL("exception occurred while deleting a column");
}
}
}
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 0720fefbf273..dda3c2384958 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2352,7 +2352,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Can position on bookmark!");
+ OSL_FAIL("Can position on bookmark!");
}
LoopGrids(GA_FORCE_SYNC);
@@ -2435,7 +2435,7 @@ IMPL_LINK(FmXFormShell, OnCanceledNotFound, FmFoundRecordInformation*, pfriWhere
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Can position on bookmark!");
+ OSL_FAIL("Can position on bookmark!");
}
diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx
index 934f59f811ee..eee5a7c2c929 100644
--- a/svx/source/table/tabledesign.cxx
+++ b/svx/source/table/tabledesign.cxx
@@ -743,7 +743,7 @@ void SAL_CALL TableDesignFamily::removeEventListener( const Reference< XEventLis
Reference<XPropertySetInfo> TableDesignFamily::getPropertySetInfo() throw (RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
return Reference<XPropertySetInfo>();
}
@@ -751,7 +751,7 @@ Reference<XPropertySetInfo> TableDesignFamily::getPropertySetInfo() throw (Runti
void TableDesignFamily::setPropertyValue( const OUString& , const Any& ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
@@ -773,28 +773,28 @@ Any TableDesignFamily::getPropertyValue( const OUString& PropertyName ) throw (U
void TableDesignFamily::addPropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
void TableDesignFamily::removePropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
void TableDesignFamily::addVetoableChangeListener( const OUString& , const Reference<XVetoableChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
void TableDesignFamily::removeVetoableChangeListener( const OUString& , const Reference<XVetoableChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// --------------------------------------------------------------------
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx
index 29f73d81672b..81f110c81815 100644
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -244,8 +244,8 @@ sal_Int32 ExpandContentProviderImpl::compareContentIds(
catch (ucb::IllegalIdentifierException & exc)
{
(void) exc; // unused
- OSL_ENSURE(
- 0, ::rtl::OUStringToOString(
+ OSL_FAIL(
+ ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return -1;
}
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index 4ef70bec95c9..e32bbdbbfef8 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -394,7 +394,7 @@ uno::Any SAL_CALL Content::execute(
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception occurred while creating the file content!");
+ OSL_FAIL("Exception occurred while creating the file content!");
}
xDataSink->setInputStream( xIn );
}
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index aaf6bd6aeef6..385e9c977c1c 100644
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -246,7 +246,7 @@ inline void ElementDescriptor::read(
if (a >>= v)
addAttribute( attrName, ::rtl::OUString::valueOf(v) );
else
- OSL_ENSURE( 0, "### unexpected property type!" );
+ OSL_FAIL( "### unexpected property type!" );
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 01f1efee03b2..9f91a337810c 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -256,7 +256,7 @@ void ElementDescriptor::readButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected radio state!" );
+ OSL_FAIL( "### unexpected radio state!" );
break;
}
}
@@ -325,7 +325,7 @@ void ElementDescriptor::readCheckBoxModel( StyleBag * all_styles )
OSL_ENSURE( bTriState, "### detected tristate value, but TriState is not set!" );
break;
default:
- OSL_ENSURE( 0, "### unexpected checkbox state!" );
+ OSL_FAIL( "### unexpected checkbox state!" );
break;
}
}
@@ -532,7 +532,7 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected radio state!" );
+ OSL_FAIL( "### unexpected radio state!" );
break;
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 4ae2ebdabc11..2dce75b26f67 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -160,7 +160,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
break;
}
default:
- OSL_ENSURE( 0, "### unexpected border value!" );
+ OSL_FAIL( "### unexpected border value!" );
break;
}
}
@@ -183,7 +183,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUSTR("simple") );
break;
default:
- OSL_ENSURE( 0, "### unexpected visual effect value!" );
+ OSL_FAIL( "### unexpected visual effect value!" );
break;
}
}
@@ -247,7 +247,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("system") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-family!" );
+ OSL_FAIL( "### unexpected font-family!" );
break;
}
}
@@ -297,7 +297,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("symbol") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-charset!" );
+ OSL_FAIL( "### unexpected font-charset!" );
break;
}
}
@@ -315,7 +315,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("variable") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-pitch!" );
+ OSL_FAIL( "### unexpected font-pitch!" );
break;
}
}
@@ -353,7 +353,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("reverse_italic") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-slant!" );
+ OSL_FAIL( "### unexpected font-slant!" );
break;
}
}
@@ -431,7 +431,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("boldwave") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-underline!" );
+ OSL_FAIL( "### unexpected font-underline!" );
break;
}
}
@@ -461,7 +461,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-strikeout!" );
+ OSL_FAIL( "### unexpected font-strikeout!" );
break;
}
}
@@ -501,7 +501,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("scalable") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-type!" );
+ OSL_FAIL( "### unexpected font-type!" );
break;
}
}
@@ -523,7 +523,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("engraved") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-relief!" );
+ OSL_FAIL( "### unexpected font-relief!" );
break;
}
// dialog:font-emphasismark (none|dot|circle|disc|accent|above|below) #IMPLIED
@@ -562,7 +562,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("below") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-emphasismark!" );
+ OSL_FAIL( "### unexpected font-emphasismark!" );
break;
}
}
@@ -626,7 +626,7 @@ void ElementDescriptor::readStringAttr(
if (a >>= v)
addAttribute( rAttrName, v );
else
- OSL_ENSURE( 0, "### unexpected property type!" );
+ OSL_FAIL( "### unexpected property type!" );
}
}
@@ -694,7 +694,7 @@ void ElementDescriptor::readDateFormatAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYYYMMDD_DIN5008") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected date format!" );
+ OSL_FAIL( "### unexpected date format!" );
break;
}
}
@@ -729,7 +729,7 @@ void ElementDescriptor::readTimeFormatAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("Duration_long") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected time format!" );
+ OSL_FAIL( "### unexpected time format!" );
break;
}
}
@@ -755,7 +755,7 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal alignment value!" );
+ OSL_FAIL( "### illegal alignment value!" );
break;
}
}
@@ -783,7 +783,7 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal vertical alignment value!" );
+ OSL_FAIL( "### illegal vertical alignment value!" );
break;
}
}
@@ -839,7 +839,7 @@ void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal image alignment value!" );
+ OSL_FAIL( "### illegal image alignment value!" );
break;
}
}
@@ -895,7 +895,7 @@ void ElementDescriptor::readImagePositionAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("center") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal image position value!" );
+ OSL_FAIL( "### illegal image position value!" );
break;
}
}
@@ -924,7 +924,7 @@ void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("help") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal button-type value!" );
+ OSL_FAIL( "### illegal button-type value!" );
break;
}
}
@@ -947,7 +947,7 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("vertical") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal orientation value!" );
+ OSL_FAIL( "### illegal orientation value!" );
break;
}
}
@@ -973,7 +973,7 @@ void ElementDescriptor::readLineEndFormatAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("carriage-return-line-feed") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal line end format value!" );
+ OSL_FAIL( "### illegal line end format value!" );
break;
}
}
@@ -1066,7 +1066,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("range") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal selection type value!" );
+ OSL_FAIL( "### illegal selection type value!" );
break;
}
}
@@ -1114,7 +1114,7 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
}
else
{
- OSL_ENSURE( 0, "unexpected property type for \"Enabled\": not bool!" );
+ OSL_FAIL( "unexpected property type for \"Enabled\": not bool!" );
}
sal_Bool bVisible = sal_True;
@@ -1303,7 +1303,7 @@ void ElementDescriptor::readEvents()
}
else
{
- OSL_ENSURE( 0, "### unexpected event type in container!" );
+ OSL_FAIL( "### unexpected event type in container!" );
}
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index e09f2d6b519e..2aa541b08efd 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -722,7 +722,7 @@ void FormattedFieldElement::endElement()
}
catch (util::MalformedNumberFormatException & exc)
{
- OSL_ENSURE( 0, "### util::MalformedNumberFormatException occurred!" );
+ OSL_FAIL( "### util::MalformedNumberFormatException occurred!" );
// rethrow
throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), Any() );
}
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 45a76ffc15fa..100a3972101b 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -95,7 +95,7 @@ Reference< XComponentContext > createInitialComponentContext(
catch( Exception& rExc )
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
return xContext;
@@ -178,7 +178,7 @@ void MyApp::Main()
{
if (GetCommandLineParamCount() < 2)
{
- OSL_ENSURE( 0, "usage: imexp inst_dir inputfile [outputfile]\n" );
+ OSL_FAIL( "usage: imexp inst_dir inputfile [outputfile]\n" );
return;
}
@@ -226,12 +226,12 @@ void MyApp::Main()
aStr += OString( " >>> " );
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
}
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
catch (uno::Exception & rExc)
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );