diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-08 15:40:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-08 20:45:13 +0100 |
commit | b66a96d792e9ef8022547f835ed4633c8e7f4c10 (patch) | |
tree | 03a891908dc40de4c3b3bc1b2b031043177e3006 /comphelper/source | |
parent | 4c4e2868f885a0a7403f8b48dc6f485e0a5f8ca5 (diff) |
coverity#1224993 Uncaught exception
Change-Id: If5dcb4bbd728f7396e19382f85bdf2a3d77a6db6
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/sequenceashashmap.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index 35f2d6bf118a..b34d8c93cd8e 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -75,11 +75,9 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource) return; } - throw css::beans::IllegalTypeException( - "Any contains wrong type." ); + throw std::invalid_argument("Any contains wrong type."); } - void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lSource) { sal_Int32 c = lSource.getLength(); @@ -94,8 +92,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (lP.Name.isEmpty()) || (!lP.Value.hasValue()) ) - throw css::beans::IllegalTypeException( - "PropertyValue struct contains no useful information." ); + throw std::invalid_argument("PropertyValue struct contains no useful information."); (*this)[lP.Name] = lP.Value; continue; } @@ -107,16 +104,14 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (lN.Name.isEmpty()) || (!lN.Value.hasValue()) ) - throw css::beans::IllegalTypeException( - "NamedValue struct contains no useful information." ); + throw std::invalid_argument("NamedValue struct contains no useful information."); (*this)[lN.Name] = lN.Value; continue; } // ignore VOID Any ... but reject wrong filled ones! if (lSource[i].hasValue()) - throw css::beans::IllegalTypeException( - "Any contains wrong type." ); + throw std::invalid_argument("Any contains wrong type."); } } |