summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-15 18:51:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-15 18:51:07 +0100
commit27d02a348b987de0f1a9c2142724a46a03730cf5 (patch)
tree4406b8f85318c8bdb2d3b7fb4dc48611cd95c1df /package
parent29c49b37048e550f4ba1d6af21c118c6b96a9288 (diff)
Improve debug messages
Some of those SAL_WARNs might actually better be SAL_INFOs; please change if they hit too often. Change-Id: I2a3b9bd485586b7878194f84bc734b54ce69bc06
Diffstat (limited to 'package')
-rw-r--r--package/source/manifest/ManifestReader.cxx9
-rw-r--r--package/source/zipapi/XUnbufferedStream.cxx3
-rw-r--r--package/source/zippackage/ZipPackage.cxx21
3 files changed, 22 insertions, 11 deletions
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
index bba764a47147..feac40c72f8b 100644
--- a/package/source/manifest/ManifestReader.cxx
+++ b/package/source/manifest/ManifestReader.cxx
@@ -67,14 +67,17 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ManifestReader::readManifestSeque
while( aIter != aEnd )
*pSequence++ = (*aIter++);
}
- catch (SAXParseException& )
+ catch (SAXParseException& e)
{
+ SAL_WARN("package", "ignoring SAXParseException " + e.Message);
}
- catch (SAXException& )
+ catch (SAXException& e)
{
+ SAL_WARN("package", "ignoring SAXException " + e.Message);
}
- catch (IOException& )
+ catch (IOException& e)
{
+ SAL_WARN("package", "ignoring IOException " + e.Message);
}
xParser->setDocumentHandler ( Reference < XDocumentHandler > () );
return aManifestSequence;
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 37599c3678f1..cb4b8123a71c 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -140,9 +140,10 @@ XUnbufferedStream::XUnbufferedStream(
try {
if ( mxZipSeek.is() )
mnZipSize = mxZipSeek->getLength();
- } catch( Exception& )
+ } catch( Exception& e )
{
// in case of problem the size will stay set to 0
+ SAL_WARN("package", "ignoring Exception " + e.Message);
}
mnZipEnd = mnZipCurrent + mnZipSize;
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index c3561abc605f..8c714a38e1ed 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -397,7 +397,10 @@ void ZipPackage::parseManifest()
// the mimetype stream should contain the information from manifest.xml
if ( !m_pRootFolder->GetMediaType().equals( aPackageMediatype ) )
throw ZipIOException(
- OSL_LOG_PREFIX "mimetype conflicts with manifest.xml\n",
+ (OSL_LOG_PREFIX
+ "mimetype conflicts with manifest.xml, \""
+ + m_pRootFolder->GetMediaType() + "\" vs. \""
+ + aPackageMediatype + "\""),
uno::Reference< uno::XInterface >() );
}
@@ -580,7 +583,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
throw( Exception, RuntimeException )
{
RTL_LOGFILE_TRACE_AUTHOR ( "package", LOGFILE_AUTHOR, "{ ZipPackage::initialize" );
- sal_Bool bBadZipFile = sal_False, bHaveZipFile = sal_True;
+ sal_Bool bHaveZipFile = sal_True;
uno::Reference< XProgressHandler > xProgressHandler;
beans::NamedValue aNamedValue;
@@ -750,18 +753,22 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
}
if ( bHaveZipFile )
{
+ bool bBadZipFile = false;
+ OUString message;
try
{
m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, sal_True, m_bForceRecovery, xProgressHandler );
getZipFileContents();
}
- catch ( IOException & )
+ catch ( IOException & e )
{
- bBadZipFile = sal_True;
+ bBadZipFile = true;
+ message = "IOException: " + e.Message;
}
- catch ( ZipException & )
+ catch ( ZipException & e )
{
- bBadZipFile = sal_True;
+ bBadZipFile = true;
+ message = "ZipException: " + e.Message;
}
catch ( Exception & )
{
@@ -775,7 +782,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
if( m_pZipFile ) { delete m_pZipFile; m_pZipFile = NULL; }
throw com::sun::star::packages::zip::ZipIOException (
- OSL_LOG_PREFIX "Bad Zip File.",
+ OSL_LOG_PREFIX "Bad Zip File, " + message,
static_cast < ::cppu::OWeakObject * > ( this ) );
}
}