summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-03-02 13:33:48 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-03-03 11:58:53 +0000
commitf1ea8c43a8ab6b8d158d4d8f3a0039b3a2ac2c37 (patch)
tree7535f39ef8fade322c3f00db4cb77d3b0ce44dc8
parentofz: timeout in infinite loop (diff)
downloadcore-f1ea8c43a8ab6b8d158d4d8f3a0039b3a2ac2c37.tar.gz
core-f1ea8c43a8ab6b8d158d4d8f3a0039b3a2ac2c37.zip
LOKit runMacro: show also the error code
Change-Id: I6ac2b274e25046f90910e3fb03b10e1052187e2f Reviewed-on: https://gerrit.libreoffice.org/34815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--desktop/source/lib/init.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c06891577b96..9cb7f3becf20 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;
}