Kaydet (Commit) 1b206f37 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add the SalAbort message to the crash reporter

Change-Id: Ibe08034bcf2a73fb12562c87c2898db1e974376c
Reviewed-on: https://gerrit.libreoffice.org/31577Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 8b86e9de
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "unx/desktops.hxx" #include "unx/desktops.hxx"
#include <vcl/printerinfomanager.hxx> #include <vcl/printerinfomanager.hxx>
#include <config_vclplug.h> #include <config_vclplug.h>
#include <desktop/crashreport.hxx>
#include <cstdio> #include <cstdio>
#include <unistd.h> #include <unistd.h>
...@@ -288,7 +289,10 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore ) ...@@ -288,7 +289,10 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore )
if( rErrorText.isEmpty() ) if( rErrorText.isEmpty() )
std::fprintf( stderr, "Application Error\n" ); std::fprintf( stderr, "Application Error\n" );
else else
{
CrashReporter::AddKeyValue("AbortMessage", rErrorText);
std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() ); std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
}
if( bDumpCore ) if( bDumpCore )
abort(); abort();
else else
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include "salimestatus.hxx" #include "salimestatus.hxx"
#include "salsys.hxx" #include "salsys.hxx"
#include <desktop/crashreport.hxx>
#if defined _MSC_VER #if defined _MSC_VER
#ifndef min #ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b))
...@@ -100,6 +102,7 @@ void SalAbort( const OUString& rErrorText, bool ) ...@@ -100,6 +102,7 @@ void SalAbort( const OUString& rErrorText, bool )
} }
else else
{ {
CrashReporter::AddKeyValue("AbortMessage", rErrorText);
// make sure crash reporter is triggered // make sure crash reporter is triggered
RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr ); RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr );
FatalAppExitW( 0, reinterpret_cast<LPCWSTR>(rErrorText.getStr()) ); FatalAppExitW( 0, reinterpret_cast<LPCWSTR>(rErrorText.getStr()) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment