From 01c25f366c9655e1446dec86e726e5e0b3e4a6da Mon Sep 17 00:00:00 2001
From: sb <sb@openoffice.org>
Date: Mon, 1 Mar 2010 16:48:19 +0100
Subject: sb118: make sure test OOo instances can dump core upon crash

---
 desktop/source/app/app.cxx        | 29 ++++-------------------------
 desktop/source/inc/exithelper.hxx |  4 ----
 2 files changed, 4 insertions(+), 29 deletions(-)

(limited to 'desktop')

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 66e8d0afebed..efba60ca75b9 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1149,16 +1149,6 @@ USHORT Desktop::Exception(USHORT nError)
 
     switch( nError & EXC_MAJORTYPE )
     {
-/*
-        case EXC_USER:
-            if( nError == EXC_OUTOFMEMORY )
-            {
-                // not possible without a special NewHandler!
-                String aMemExceptionString;
-                Application::Abort( aMemExceptionString );
-            }
-            break;
-*/
         case EXC_RSCNOTLOADED:
         {
             String aResExceptionString;
@@ -1175,23 +1165,14 @@ USHORT Desktop::Exception(USHORT nError)
 
         default:
         {
-            if ( pArgs->IsNoRestore() ) {
-                if (m_pLockfile != NULL) {
-                    m_pLockfile->clean();
-                }
-                _exit( ExitHelper::E_LOCKFILE );
+            if (m_pLockfile != NULL) {
+                m_pLockfile->clean();
             }
-
             if( bRestart )
             {
                 OfficeIPCThread::DisableOfficeIPCThread();
                 if( pSignalHandler )
                     DELETEZ( pSignalHandler );
-
-                if (m_pLockfile != NULL) {
-                    m_pLockfile->clean();
-                }
-
 #ifdef MACOSX
                 DoRestart();
 #endif
@@ -1199,17 +1180,15 @@ USHORT Desktop::Exception(USHORT nError)
             }
             else
             {
-                bInException = sal_False;
-                _exit( ExitHelper::E_CRASH );
+                Application::Abort( String() );
             }
 
             break;
         }
     }
 
+    OSL_ASSERT(false); // unreachable
     return 0;
-
-    // ConfigManager is disposed, so no way to continue
 }
 
 void Desktop::AppEvent( const ApplicationEvent& rAppEvent )
diff --git a/desktop/source/inc/exithelper.hxx b/desktop/source/inc/exithelper.hxx
index 958b549adfa0..2e6d7e774d98 100644
--- a/desktop/source/inc/exithelper.hxx
+++ b/desktop/source/inc/exithelper.hxx
@@ -56,12 +56,8 @@ class ExitHelper
             E_SECOND_OFFICE = 1,
             /// an uno exception was catched during startup
             E_FATAL_ERROR = 333,    // Only the low 8 bits are significant 333 % 256 = 77
-            /// crash during runtime
-            E_CRASH = 78,
             /// user force automatic restart after crash
             E_CRASH_WITH_RESTART = 79,
-            /// ???
-            E_LOCKFILE = 80
         };
 };
 
-- 
cgit