summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-01-27 11:26:58 +0000
committerOliver Bolte <obo@openoffice.org>2005-01-27 11:26:58 +0000
commit5c83ea17fd5268862101191464d05fe96d6e3a7e (patch)
tree2db368e1360e7442122706864bf9d34a2dbf9d60 /desktop
parentce422a929dc0f924fb86c003dedb63d62b762f93 (diff)
INTEGRATION: CWS kso13 (1.162.4); FILE MERGED
2005/01/17 15:45:45 sb 1.162.4.1: #i8581# When displaying a bootstrap error message box can fail and crash the process, print the relevant message, in hard-coded english, on stderr first, to increase the chance that the user sees a useful message.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 344a49a45c43..9e3a813a99e0 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: app.cxx,v $
*
- * $Revision: 1.163 $
+ * $Revision: 1.164 $
*
- * last change: $Author: kz $ $Date: 2005-01-21 17:35:22 $
+ * last change: $Author: obo $ $Date: 2005-01-27 12:26:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -320,6 +320,8 @@
#include "langselect.hxx"
+#include <stdio.h>
+
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
@@ -1008,6 +1010,24 @@ void Desktop::HandleBootstrapErrors( BootstrapError aBootstrapError )
// Uno service manager is not available. VCL needs a uno service manager to display a message box!!!
// Currently we are not able to display a message box with a service manager due to this limitations inside VCL.
+ // When UNO is not properly initialized, all kinds of things can fail
+ // and cause the process to crash (e.g., a call to GetMsgString may
+ // crash when somewhere deep within that call Any::operator <= is used
+ // with a PropertyValue, and no binary UNO type description for
+ // PropertyValue is available). To give the user a hint even if
+ // generating and displaying a message box below crashes, print a
+ // hard-coded message on stderr first:
+ fputs(
+ aBootstrapError == BE_UNO_SERVICEMANAGER
+ ? ("The application cannot be started. " "\n"
+ "The component manager is not available." "\n")
+ // STR_BOOTSTRAP_ERR_CANNOT_START, STR_BOOTSTRAP_ERR_NO_SERVICE
+ : ("The application cannot be started. " "\n"
+ "The configuration service is not available." "\n"),
+ // STR_BOOTSTRAP_ERR_CANNOT_START,
+ // STR_BOOTSTRAP_ERR_NO_CFG_SERVICE
+ stderr);
+
// First sentence. We cannot bootstrap office further!
OUString aMessage;
OUStringBuffer aDiagnosticMessage( 100 );