diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-05 15:50:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-05 15:50:24 +0100 |
commit | b1a5a7e2be619be2d52094eff6802f0ef5470ca4 (patch) | |
tree | 489d5550fd78b3c038980838cbf3531d70d6b109 /desktop | |
parent | 3f026077dcdee5118bc42114fd9343e4a8a4b477 (diff) |
coverity#706497 Uncaught exception
Change-Id: I6c2acde8c47f6f2c0b65b228737950a1d8972f8a
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/registry/dp_backend.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index cdf0c1d28af4..d31163045648 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -574,9 +574,19 @@ void Package::exportTo( ::ucbhelper::Content destFolder( destFolderURL, xCmdEnv, getMyBackend()->getComponentContext() ); ::ucbhelper::Content sourceContent( getURL(), xCmdEnv, getMyBackend()->getComponentContext() ); - if (! destFolder.transferContent( + bool bOk; + try + { + bOk = destFolder.transferContent( sourceContent, ::ucbhelper::InsertOperation_COPY, - newTitle, nameClashAction )) + newTitle, nameClashAction); + } + catch (const css::ucb::ContentCreationException&) + { + bOk = false; + } + + if (!bOk) throw RuntimeException( "UCB transferContent() failed!", 0 ); } |