Smalltalk.st
changeset 20854 90b191e5945d
parent 20853 9cc798fa81e0
child 20855 4f5dd0743af3
--- a/Smalltalk.st	Sat Nov 05 17:18:58 2016 +0100
+++ b/Smalltalk.st	Sat Nov 05 17:46:24 2016 +0100
@@ -4426,25 +4426,36 @@
                         VerboseStartup == true ifTrue:[
                             ('Smalltalk [info]: reading script from: "', arg, '".') infoPrintCR.
                         ].
-                        UserInterrupt handle:[:ex |
-                            Debugging == true ifTrue:[
-                                'user interrupt (type "c" to continue; "x" to exit; "?" for help).' errorPrintCR.
-                                "/ thisContext fullPrintAll.
-                                MiniDebugger enter.
-                                ex proceed.
-                            ].    
-                            self exit:128+(OperatingSystem sigINT).
+                        NoHandlerError handle:[:ex |
+                            Debugging == true ifFalse:[
+                                ex description _errorPrintCR.
+                                (VerboseStartup or:[ObjectMemory debugPrinting]) ifTrue:[
+                                    ex suspendedContext fullPrintAll.
+                                ].
+                                self exit:1
+                            ].
+                            ex reject.
                         ] do:[
-                            arg = '-' ifTrue:[
-                                self fileInStream:Stdin
-                                       lazy:nil
-                                       silent:nil
-                                       logged:false
-                                       addPath:nil
-                            ] ifFalse:[
-                                IsSTScript := true.
-                                Smalltalk silentlyLoadingDo:[
-                                    self fileIn:arg.
+                            UserInterrupt handle:[:ex |
+                                Debugging == true ifTrue:[
+                                    'user interrupt (type "c" to continue; "x" to exit; "?" for help).' errorPrintCR.
+                                    "/ thisContext fullPrintAll.
+                                    MiniDebugger enter.
+                                    ex proceed.
+                                ].    
+                                self exit:128+(OperatingSystem sigINT).
+                            ] do:[
+                                arg = '-' ifTrue:[
+                                    self fileInStream:Stdin
+                                           lazy:nil
+                                           silent:nil
+                                           logged:false
+                                           addPath:nil
+                                ] ifFalse:[
+                                    IsSTScript := true.
+                                    Smalltalk silentlyLoadingDo:[
+                                        self fileIn:arg.
+                                    ].
                                 ].
                             ].
                         ].