diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-03-02 13:33:48 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-03-03 11:58:53 +0000 |
commit | f1ea8c43a8ab6b8d158d4d8f3a0039b3a2ac2c37 (patch) | |
tree | 7535f39ef8fade322c3f00db4cb77d3b0ce44dc8 /desktop | |
parent | d426c6246f1f102dca007962d2344bbd7aeb9780 (diff) |
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>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 8 |
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; } |