[Libreoffice-commits] core.git: Branch 'feature/cib_contract561' - desktop/source

Katarina Behrens Katarina.Behrens at cib.de
Thu Mar 2 15:48:14 UTC 2017


Rebased ref, commits from common ancestor:
commit fd44372017badf291324d821f2708def878ba229
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Thu Mar 2 13:33:48 2017 +0100

    LOKit runMacro: show also the error code
    
    Change-Id: I6ac2b274e25046f90910e3fb03b10e1052187e2f

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2281d5c..ff15639 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -41,7 +41,6 @@
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/frame/DispatchResultEvent.hpp>
 #include <com/sun/star/frame/DispatchResultState.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -498,8 +497,11 @@ static bool lo_runMacro( LibreOfficeKit* pThis, const char *pURL)
 
         if (aErr.Name == "ErrorCode")
         {
-            pLib->maLastExceptionMsg = "An error occured running macro";
-            SAL_INFO("lok", "Macro execution terminated with errors");
+            sal_uInt32 nErrCode = ERRCODE_NONE;
+            aErr.Value >>= nErrCode;
+
+            pLib->maLastExceptionMsg = "An error occured running macro (error code: " + OUString::number( nErrCode ) + ")";
+            SAL_INFO("lok", "Macro execution terminated with error (error code: " + OUString::number( nErrCode ) + ")");
             return false;
         }
 


More information about the Libreoffice-commits mailing list