From 0e493cae407cca65f58329b3319d9c836cdf5096 Mon Sep 17 00:00:00 2001
From: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Tue, 3 Apr 2018 11:56:52 +0200
Subject: new loplugin:dbgunhandledexception

enforce that DBG_UNHANDLED_EXCEPTION is called first in a catch block,
otherwise it cannot do it's job properly

Change-Id: I906436c6861212c44f8f21552ccbceb54f15c6e1
Reviewed-on: https://gerrit.libreoffice.org/52303
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
---
 sd/source/ui/sidebar/DocumentHelper.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sd')

diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx
index b7b3519bfaa4..dc76d90a4777 100644
--- a/sd/source/ui/sidebar/DocumentHelper.cxx
+++ b/sd/source/ui/sidebar/DocumentHelper.cxx
@@ -229,8 +229,8 @@ SdPage* DocumentHelper::AddMasterPage (
         }
         catch(const uno::Exception&)
         {
-            pClonedMasterPage = nullptr;
             DBG_UNHANDLED_EXCEPTION("sd");
+            pClonedMasterPage = nullptr;
         }
         catch(const ::std::exception& e)
         {
-- 
cgit