summaryrefslogtreecommitdiff
path: root/vcl/source/app/salplug.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/salplug.cxx')
-rw-r--r--vcl/source/app/salplug.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx
index 1868853e93b8..c3e4e666e9d3 100644
--- a/vcl/source/app/salplug.cxx
+++ b/vcl/source/app/salplug.cxx
@@ -36,6 +36,7 @@
#include <unistd.h>
#else
#include <saldatabasic.hxx>
+#include <o3tl/char16_t2wchar_t.hxx>
#include <Windows.h>
#endif
@@ -292,17 +293,39 @@ void DestroySalInstance( SalInstance *pInst )
void SalAbort( const OUString& rErrorText, bool bDumpCore )
{
+#if defined _WIN32
+ //TODO: ImplFreeSalGDI();
+#endif
+
if( rErrorText.isEmpty() )
+ {
+#if defined _WIN32
+ // make sure crash reporter is triggered
+ RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr );
+ FatalAppExitW( 0, L"Application Error" );
+#else
std::fprintf( stderr, "Application Error\n" );
+#endif
+ }
else
{
CrashReporter::addKeyValue("AbortMessage", rErrorText, CrashReporter::Write);
+#if defined _WIN32
+ // make sure crash reporter is triggered
+ RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr );
+ FatalAppExitW( 0, o3tl::toW(rErrorText.getStr()) );
+#else
std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
+#endif
}
+#if defined _WIN32
+ (void) bDumpCore;
+#else
if( bDumpCore )
abort();
else
_exit(1);
+#endif
}
const OUString& SalGetDesktopEnvironment()