diff options
Diffstat (limited to 'package/source')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolder.cxx | 22 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index e156150fb9f8..2ce94b126ba2 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -988,7 +988,7 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut ) } catch ( ::com::sun::star::io::IOException & r ) { - OSL_ENSURE( 0, "Error adding mimetype to the ZipOutputStream" ); + OSL_FAIL( "Error adding mimetype to the ZipOutputStream" ); throw WrappedTargetException( OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Error adding mimetype to the ZipOutputStream!" ) ), static_cast < OWeakObject * > ( this ), @@ -1033,7 +1033,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< Sequence } else { - OSL_ENSURE ( 0, "Couldn't get a ManifestWriter!" ); + OSL_FAIL( "Couldn't get a ManifestWriter!" ); IOException aException; throw WrappedTargetException( OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Couldn't get a ManifestWriter!" ) ), diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 34170c4594b3..002d62d96319 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -341,12 +341,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr } catch ( ZipException& ) { - OSL_ENSURE( 0, "Error writing ZipOutputStream" ); + OSL_FAIL( "Error writing ZipOutputStream" ); bWritingFailed = sal_True; } catch ( IOException& ) { - OSL_ENSURE( 0, "Error writing ZipOutputStream" ); + OSL_FAIL( "Error writing ZipOutputStream" ); bWritingFailed = sal_True; } } @@ -437,7 +437,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr if ( !xStream.is() ) { - OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" ); + OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" ); bWritingFailed = sal_True; continue; } @@ -490,14 +490,14 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr } else { - OSL_ENSURE( 0, "The package component requires that every stream either be FROM a package or it must support XSeekable!" ); + OSL_FAIL( "The package component requires that every stream either be FROM a package or it must support XSeekable!" ); continue; } } } catch ( Exception& ) { - OSL_ENSURE( 0, "The stream provided to the package component has problems!" ); + OSL_FAIL( "The stream provided to the package component has problems!" ); bWritingFailed = sal_True; continue; } @@ -560,7 +560,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr if ( !xStream.is() ) { // Make sure that we actually _got_ a new one ! - OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" ); + OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" ); continue; } } @@ -588,12 +588,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr } catch ( ZipException& ) { - OSL_ENSURE( 0, "Error writing ZipOutputStream" ); + OSL_FAIL( "Error writing ZipOutputStream" ); bWritingFailed = sal_True; } catch ( IOException& ) { - OSL_ENSURE( 0, "Error writing ZipOutputStream" ); + OSL_FAIL( "Error writing ZipOutputStream" ); bWritingFailed = sal_True; } } @@ -615,7 +615,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr if ( !xStream.is() ) { // Make sure that we actually _got_ a new one ! - OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" ); + OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" ); continue; } } @@ -645,12 +645,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr } catch ( ZipException& ) { - OSL_ENSURE( 0, "Error writing ZipOutputStream" ); + OSL_FAIL( "Error writing ZipOutputStream" ); bWritingFailed = sal_True; } catch ( IOException& ) { - OSL_ENSURE( 0, "Error writing ZipOutputStream" ); + OSL_FAIL( "Error writing ZipOutputStream" ); bWritingFailed = sal_True; } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 318a6a52b873..7a299ce33262 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -417,12 +417,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData() } catch (ZipException &)//rException) { - OSL_ENSURE( 0, "ZipException thrown");//rException.Message); + OSL_FAIL( "ZipException thrown");//rException.Message); return Reference < io::XInputStream > (); } catch (Exception &) { - OSL_ENSURE( 0, "Exception is thrown during stream wrapping!\n"); + OSL_FAIL( "Exception is thrown during stream wrapping!\n"); return Reference < io::XInputStream > (); } } @@ -448,12 +448,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream( ) } catch (ZipException &)//rException) { - OSL_ENSURE( 0,"ZipException thrown");//rException.Message); + OSL_FAIL( "ZipException thrown");//rException.Message); return Reference < io::XInputStream > (); } catch (Exception &) { - OSL_ENSURE( 0, "Exception is thrown during stream wrapping!\n"); + OSL_FAIL( "Exception is thrown during stream wrapping!\n"); return Reference < io::XInputStream > (); } } |