diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-20 17:58:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-20 17:58:44 +0200 |
commit | 2d2337eb74161f9aab9bc3cf50fa63975d9c1731 (patch) | |
tree | 2321e843c678aa340b7eaf9860e247a6d5d20b38 /comphelper | |
parent | 5be1f5234b46a89a7660a9cfe3deaa00e2aa124b (diff) |
Improve some debug output
Change-Id: I1008822ba8592ea43f87805bf00adbfdaf4f02fc
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/mediadescriptor.cxx | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 82a1b29de8bb..8fefd7d9e25d 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -574,10 +574,22 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool } catch(const css::uno::RuntimeException&) { throw; } - catch(const css::ucb::ContentCreationException&) - { return sal_False; } // TODO error handling - catch(const css::uno::Exception&) - { return sal_False; } // TODO error handling + catch(const css::ucb::ContentCreationException& e) + { + SAL_WARN( + "comphelper", + "caught ContentCreationException \"" << e.Message + << "\" while opening <" << sURL << ">"); + return sal_False; // TODO error handling + } + catch(const css::uno::Exception& e) + { + SAL_WARN( + "comphelper", + "caught Exception \"" << e.Message << "\" while opening <" + << sURL << ">"); + return sal_False; // TODO error handling + } // try to open the file in read/write mode // (if its allowed to do so). @@ -606,7 +618,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool } catch(const css::uno::RuntimeException&) { throw; } - catch(const css::uno::Exception&) + catch(const css::uno::Exception& e) { // ignore exception, if reason was problem reasoned on // open it in WRITEABLE mode! Then we try it READONLY @@ -614,7 +626,13 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool // All other errors must be handled as real error an // break this method. if (!pInteraction->wasWriteError() || bModeRequestedExplicitly) + { + SAL_WARN( + "comphelper", + "caught Exception \"" << e.Message + << "\" while opening <" << sURL << ">"); return sal_False; + } xStream.clear(); xInputStream.clear(); } @@ -667,8 +685,14 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool } catch(const css::uno::RuntimeException&) { throw; } - catch(const css::uno::Exception&) - { return sal_False; } + catch(const css::uno::Exception& e) + { + SAL_WARN( + "comphelper", + "caught Exception \"" << e.Message << "\" while opening <" + << sURL << ">"); + return sal_False; + } } // add streams to the descriptor |