Kaydet (Commit) 52028d46 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "coverity#1224993 Uncaught exception"

This reverts commit b66a96d7,
follow-up commit will fix w/o breaking JunitTest_framework_unoapi.

Change-Id: Iac12d52c2eb9a1e4ab09d24910cee1838cc7d883
üst 9aa36a1a
...@@ -75,9 +75,11 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource) ...@@ -75,9 +75,11 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource)
return; return;
} }
throw std::invalid_argument("Any contains wrong type."); throw css::beans::IllegalTypeException(
"Any contains wrong type." );
} }
void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lSource) void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lSource)
{ {
sal_Int32 c = lSource.getLength(); sal_Int32 c = lSource.getLength();
...@@ -92,7 +94,8 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS ...@@ -92,7 +94,8 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(lP.Name.isEmpty()) || (lP.Name.isEmpty()) ||
(!lP.Value.hasValue()) (!lP.Value.hasValue())
) )
throw std::invalid_argument("PropertyValue struct contains no useful information."); throw css::beans::IllegalTypeException(
"PropertyValue struct contains no useful information." );
(*this)[lP.Name] = lP.Value; (*this)[lP.Name] = lP.Value;
continue; continue;
} }
...@@ -104,14 +107,16 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS ...@@ -104,14 +107,16 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(lN.Name.isEmpty()) || (lN.Name.isEmpty()) ||
(!lN.Value.hasValue()) (!lN.Value.hasValue())
) )
throw std::invalid_argument("NamedValue struct contains no useful information."); throw css::beans::IllegalTypeException(
"NamedValue struct contains no useful information." );
(*this)[lN.Name] = lN.Value; (*this)[lN.Name] = lN.Value;
continue; continue;
} }
// ignore VOID Any ... but reject wrong filled ones! // ignore VOID Any ... but reject wrong filled ones!
if (lSource[i].hasValue()) if (lSource[i].hasValue())
throw std::invalid_argument("Any contains wrong type."); throw css::beans::IllegalTypeException(
"Any contains wrong type." );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment