diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-12 16:57:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-13 09:50:53 +0100 |
commit | 9a1298cf868bb82a0232e51dc7410ebf3a62b646 (patch) | |
tree | 8d0cd686c52a2c6a2923ebcae41298cbbd4c1cc2 /basctl | |
parent | 9d1e6613c4cf40ef66d9775a8c362e63cf3736d0 (diff) |
coverity#1213488 Uncaught exception
Change-Id: Iee4e5dd2936979a9bcb8bd5db781e51551270a7f
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/scriptdocument.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 63cab3c3d067..4847ad098d92 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -421,20 +421,26 @@ namespace basctl return bResult; } - BasicManager* ScriptDocument::Impl::getBasicManager() const { - OSL_ENSURE( isValid(), "ScriptDocument::Impl::getBasicManager: invalid state!" ); - if ( !isValid() ) - return NULL; + try + { + OSL_ENSURE( isValid(), "ScriptDocument::Impl::getBasicManager: invalid state!" ); + if ( !isValid() ) + return NULL; - if ( isApplication() ) - return SFX_APP()->GetBasicManager(); + if ( isApplication() ) + return SFX_APP()->GetBasicManager(); - return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument ); + return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument ); + } + catch (const css::ucb::ContentCreationException& e) + { + SAL_WARN( "basctl.basicide", "ScriptDocument::getBasicManager: Caught exception: " << e.Message ); + } + return NULL; } - Reference< XModel > ScriptDocument::Impl::getDocument() const { OSL_ENSURE( isValid(), "ScriptDocument::Impl::getDocument: invalid state!" ); |