diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-03 04:22:09 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-03 11:20:22 +0000 |
commit | 1b206f37d0f9b61ebc908f58b33515c055ff1a75 (patch) | |
tree | da5ddb58033235c41ca17cd88e326ac0837a3fa3 | |
parent | 8b86e9de388fff673bc86c14246eff8ed6aa591e (diff) |
add the SalAbort message to the crash reporter
Change-Id: Ibe08034bcf2a73fb12562c87c2898db1e974376c
Reviewed-on: https://gerrit.libreoffice.org/31577
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 4 | ||||
-rw-r--r-- | vcl/win/app/salinst.cxx | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 6852c0652024..ce032538044b 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -30,6 +30,7 @@ #include "unx/desktops.hxx" #include <vcl/printerinfomanager.hxx> #include <config_vclplug.h> +#include <desktop/crashreport.hxx> #include <cstdio> #include <unistd.h> @@ -288,7 +289,10 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore ) if( rErrorText.isEmpty() ) std::fprintf( stderr, "Application Error\n" ); else + { + CrashReporter::AddKeyValue("AbortMessage", rErrorText); std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() ); + } if( bDumpCore ) abort(); else diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index cee4e5419d92..94ae96d53608 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -43,6 +43,8 @@ #include "salimestatus.hxx" #include "salsys.hxx" +#include <desktop/crashreport.hxx> + #if defined _MSC_VER #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) @@ -100,6 +102,7 @@ void SalAbort( const OUString& rErrorText, bool ) } else { + CrashReporter::AddKeyValue("AbortMessage", rErrorText); // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr ); FatalAppExitW( 0, reinterpret_cast<LPCWSTR>(rErrorText.getStr()) ); |