[Libreoffice-commits] core.git: desktop/source

Katarina Behrens Katarina.Behrens at cib.de
Fri Mar 3 11:59:33 UTC 2017


 desktop/source/lib/init.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit f1ea8c43a8ab6b8d158d4d8f3a0039b3a2ac2c37
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
    Reviewed-on: https://gerrit.libreoffice.org/34815
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c068915..9cb7f3b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1288,8 +1288,12 @@ static bool lo_runMacro( LibreOfficeKit* pThis, const char *pURL)
 
         if (aErr.Name == "ErrorCode")
         {
-            pLib->maLastExceptionMsg = "An error occurred running macro";
-            SAL_INFO("lok", "Macro execution terminated with errors");
+            sal_uInt32 nErrCode = ERRCODE_NONE;
+            aErr.Value >>= nErrCode;
+
+            pLib->maLastExceptionMsg = "An error occurred 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