summaryrefslogtreecommitdiff
path: root/stoc/source/corereflection/criface.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-28 16:24:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-29 07:11:04 +0100
commit98e60805613ab6ea19c03c34c0f36d00374dab73 (patch)
treefb8249445f7ccb3005b5942e7bb495b671033b8e /stoc/source/corereflection/criface.cxx
parent4cff06065ebfe884d8661b790db76f15203f2549 (diff)
loplugin:flatten in stoc..store
Change-Id: Ib8c86179a3d13852cbb02b389b6103aca5456dba Reviewed-on: https://gerrit.libreoffice.org/67013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/corereflection/criface.cxx')
-rw-r--r--stoc/source/corereflection/criface.cxx33
1 files changed, 17 insertions, 16 deletions
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index c37108081fbe..041272a51a28 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -295,23 +295,24 @@ void IdlAttributeFieldImpl::set( const Any & rObj, const Any & rValue )
void IdlAttributeFieldImpl::checkException(
uno_Any * exception, Reference< XInterface > const & context) const
{
- if (exception != nullptr) {
- Any e;
- uno_any_destruct(&e, reinterpret_cast< uno_ReleaseFunc >(cpp_release));
- uno_type_any_constructAndConvert(
- &e, exception->pData, exception->pType,
- getReflection()->getUno2Cpp().get());
- uno_any_destruct(exception, nullptr);
- if (!e.isExtractableTo(
- cppu::UnoType<RuntimeException>::get()))
- {
- throw WrappedTargetRuntimeException(
- "non-RuntimeException occurred when accessing an"
- " interface type attribute",
- context, e);
- }
- cppu::throwException(e);
+ if (exception == nullptr)
+ return;
+
+ Any e;
+ uno_any_destruct(&e, reinterpret_cast< uno_ReleaseFunc >(cpp_release));
+ uno_type_any_constructAndConvert(
+ &e, exception->pData, exception->pType,
+ getReflection()->getUno2Cpp().get());
+ uno_any_destruct(exception, nullptr);
+ if (!e.isExtractableTo(
+ cppu::UnoType<RuntimeException>::get()))
+ {
+ throw WrappedTargetRuntimeException(
+ "non-RuntimeException occurred when accessing an"
+ " interface type attribute",
+ context, e);
}
+ cppu::throwException(e);
}