diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-25 11:15:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-25 11:46:55 +0100 |
commit | f1c75c6d49c4e263657670da1e5b44d9a382f7ac (patch) | |
tree | e5cc891de83ba904d26e6a43c1b3679c875e0871 /unoxml/source | |
parent | 89b8e673b7f37d2c990374e3ca80ad6138d0d783 (diff) |
coverity#1158284 Uncaught exception
Change-Id: I19e541707fa91d6a651b8642585276cbdbb2dca8
Diffstat (limited to 'unoxml/source')
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index b7333f6fb222..2cdcdaa51104 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1599,15 +1599,24 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } else { m_RDFaXHTMLContentSet.insert(sXmlId); } - for (::std::vector< ::boost::shared_ptr<librdf_TypeConverter::Resource> > - ::iterator iter = predicates.begin(); iter != predicates.end(); - ++iter) + try { - addStatementGraph_Lock( - librdf_TypeConverter::Statement(pSubject, - ::boost::dynamic_pointer_cast<librdf_TypeConverter::URI>(*iter), - pContent), - sContext, true); + for (::std::vector< ::boost::shared_ptr<librdf_TypeConverter::Resource> > + ::iterator iter = predicates.begin(); iter != predicates.end(); + ++iter) + { + addStatementGraph_Lock( + librdf_TypeConverter::Statement(pSubject, + ::boost::dynamic_pointer_cast<librdf_TypeConverter::URI>(*iter), + pContent), + sContext, true); + } + } + catch (const container::NoSuchElementException& e) + { + throw lang::WrappedTargetRuntimeException( + "librdf_Repository::setStatementRDFa: " + "cannot addStatementGraph", *this, uno::makeAny(e)); } } |