[Libreoffice-commits] core.git: Branch 'feature/cib_contract561' - desktop/source
Katarina Behrens
Katarina.Behrens at cib.de
Thu Mar 2 12:44:58 UTC 2017
desktop/source/lib/init.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 5839e09bd6837f9e54757d18e862283595167018
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..c441de9 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;
+ 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