From f1c75c6d49c4e263657670da1e5b44d9a382f7ac Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 25 Jul 2014 11:15:28 +0100 Subject: coverity#1158284 Uncaught exception Change-Id: I19e541707fa91d6a651b8642585276cbdbb2dca8 --- unoxml/source/rdf/librdf_repository.cxx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'unoxml/source') 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 > - ::iterator iter = predicates.begin(); iter != predicates.end(); - ++iter) + try { - addStatementGraph_Lock( - librdf_TypeConverter::Statement(pSubject, - ::boost::dynamic_pointer_cast(*iter), - pContent), - sContext, true); + for (::std::vector< ::boost::shared_ptr > + ::iterator iter = predicates.begin(); iter != predicates.end(); + ++iter) + { + addStatementGraph_Lock( + librdf_TypeConverter::Statement(pSubject, + ::boost::dynamic_pointer_cast(*iter), + pContent), + sContext, true); + } + } + catch (const container::NoSuchElementException& e) + { + throw lang::WrappedTargetRuntimeException( + "librdf_Repository::setStatementRDFa: " + "cannot addStatementGraph", *this, uno::makeAny(e)); } } -- cgit