coverity#1224993 Uncaught exception

Change-Id: If5dcb4bbd728f7396e19382f85bdf2a3d77a6db6
This commit is contained in:
Caolán McNamara
2014-10-08 15:40:07 +01:00
parent 4c4e2868f8
commit b66a96d792

View File

@@ -75,11 +75,9 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource)
return; return;
} }
throw css::beans::IllegalTypeException( throw std::invalid_argument("Any contains wrong type.");
"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();
@@ -94,8 +92,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(lP.Name.isEmpty()) || (lP.Name.isEmpty()) ||
(!lP.Value.hasValue()) (!lP.Value.hasValue())
) )
throw css::beans::IllegalTypeException( throw std::invalid_argument("PropertyValue struct contains no useful information.");
"PropertyValue struct contains no useful information." );
(*this)[lP.Name] = lP.Value; (*this)[lP.Name] = lP.Value;
continue; continue;
} }
@@ -107,16 +104,14 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(lN.Name.isEmpty()) || (lN.Name.isEmpty()) ||
(!lN.Value.hasValue()) (!lN.Value.hasValue())
) )
throw css::beans::IllegalTypeException( throw std::invalid_argument("NamedValue struct contains no useful information.");
"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 css::beans::IllegalTypeException( throw std::invalid_argument("Any contains wrong type.");
"Any contains wrong type." );
} }
} }