standAlone graphical app gives user a chance to ignore errors
authorClaus Gittinger <cg@exept.de>
Fri, 08 Mar 1996 20:41:41 +0100
changeset 1094 af10927dc0f2
parent 1093 1e742016eea0
child 1095 834d4fb13e9f
standAlone graphical app gives user a chance to ignore errors
Object.st
--- a/Object.st	Fri Mar 08 13:36:35 1996 +0100
+++ b/Object.st	Fri Mar 08 20:41:41 1996 +0100
@@ -1824,17 +1824,26 @@
      (this allows intermediate helpers to hide themselfes from what is
      presented to the user)"
 
-    |debugger|
+    |debugger msg|
 
     "
      if there is no debugger, exit smalltalk
     "
     Debugger isNil ifTrue:[
-	'error: ' errorPrint. aString errorPrintNL.
-	Smalltalk isStandAloneApp ifTrue:[
-	    OperatingSystem exit:1
-	].
-	Smalltalk fatalAbort:'no Debugger defined'
+        msg := 'error: ' , aString.
+
+        Smalltalk isStandAloneApp ifTrue:[
+            Dialog notNil ifTrue:[
+                Dialog autoload.        "in case its autoloaded"
+                (Dialog confirm:msg yesLabel:'ignore' noLabel:'exit') ifTrue:[
+                    ^ self
+                ]
+            ].
+            msg errorPrintNL.
+            OperatingSystem exit:1
+        ].
+        msg errorPrintNL.
+        Smalltalk fatalAbort:'no Debugger defined'
     ].
 
     "
@@ -1842,6 +1851,8 @@
     "
     debugger := self appropriateDebugger:#'enter:withMessage:'.
     ^ debugger enter:aContext withMessage:aString.
+
+    "Modified: 8.3.1996 / 20:40:48 / cg"
 !
 
 error
@@ -4353,6 +4364,6 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.100 1996-03-07 18:42:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.101 1996-03-08 19:41:41 cg Exp $'
 ! !
 Object initialize!