Smalltalk.st
changeset 19427 cde32174b580
parent 19426 20aa001ebd18
child 19429 17aac79214ad
--- a/Smalltalk.st	Wed Mar 23 19:38:51 2016 +0100
+++ b/Smalltalk.st	Wed Mar 23 19:44:38 2016 +0100
@@ -20,9 +20,9 @@
 		StartupArguments CommandLine CommandName CommandLineArguments
 		CachedAbbreviations VerboseStartup VerboseLoading Verbose
 		SilentLoading Initializing StandAlone HeadlessOperation IsPlugin
-		IsSharedLibraryComponent IsSTScript DebuggingStandAlone LogDoits
-		LoadBinaries RealSystemPath ResourcePath SourcePath BinaryPath
-		FileInPath PackagePath BinaryDirName ResourceDirName
+		IsSharedLibraryComponent IsSTScript DebuggingStandAlone Debugging
+		LogDoits LoadBinaries RealSystemPath ResourcePath SourcePath
+		BinaryPath FileInPath PackagePath BinaryDirName ResourceDirName
 		SourceDirName BitmapDirName PackageDirName FileInDirName
 		ChangeFileName ImageStartTime ImageRestartTime DemoMode
 		SaveEmergencyImage SpecialObjectArray CallbackSignal
@@ -546,19 +546,19 @@
     "sent from VM via #initializeModules"
 
     Error handle:[:ex |
-	ObjectMemory printStackBacktrace.
-	ClassesFailedToInitialize isNil ifTrue:[
-	    ClassesFailedToInitialize := IdentitySet new.
-	].
-	ClassesFailedToInitialize add:aClass.
-	('Smalltalk [warning]: error during initialize of ' , aClass name,': ', ex description printString) errorPrintCR.
-	ex suspendedContext fullPrintAll.
-	'------------------------------------------------' errorPrintCR.
-	((DebuggingStandAlone == true) or:[ Smalltalk commandLineArguments includes:'--debug']) ifTrue:[
-	    ex reject
-	].
+        ObjectMemory printStackBacktrace.
+        ClassesFailedToInitialize isNil ifTrue:[
+            ClassesFailedToInitialize := IdentitySet new.
+        ].
+        ClassesFailedToInitialize add:aClass.
+        ('Smalltalk [warning]: error during initialize of ' , aClass name,': ', ex description printString) errorPrintCR.
+        ex suspendedContext fullPrintAll.
+        '------------------------------------------------' errorPrintCR.
+        (Debugging == true) ifTrue:[
+            ex reject
+        ].
     ] do:[
-	aClass initialize
+        aClass initialize
     ].
 
     "Modified: / 11-09-2011 / 17:01:32 / cg"
@@ -635,17 +635,16 @@
     Verbose := false.
     self initializeVerboseFlags.    
 
-    DebuggingStandAlone := false.
-
+    DebuggingStandAlone := Debugging := false.
+    idx := CommandLineArguments indexOf:'--debug'.
+    Debugging := (idx ~~ 0).
+    
     StandAlone ifTrue:[
         InfoPrinting := false.
         ObjectMemory infoPrinting:false.
         IgnoreAssertions := true.
 
-        idx := CommandLineArguments indexOf:'--debug'.
-        idx ~~ 0 ifTrue:[
-            DebuggingStandAlone := true.
-        ].
+        DebuggingStandAlone := Debugging.
         DebuggingStandAlone ifTrue:[
             Inspector := MiniInspector.
             Debugger := MiniDebugger.
@@ -4280,7 +4279,7 @@
                         ('Smalltalk [info]: reading script from: "', arg, '".') infoPrintCR.
                     ].
                     UserInterrupt handle:[:ex |
-                        DebuggingStandAlone ifTrue:[
+                        Debugging == true ifTrue:[
                             'Smalltalk [error]: user interrupt.' errorPrintCR.
                             thisContext fullPrintAll.
                             ex reject.
@@ -4387,7 +4386,7 @@
                         ('Smalltalk [info]: executing expression: "', arg, '".') infoPrintCR.
                     ].
                     UserInterrupt handle:[:ex |
-                        DebuggingStandAlone ifTrue:[
+                        Debugging == true ifTrue:[
                             'Smalltalk [error]: user interrupt.' errorPrintCR.
                             thisContext fullPrintAll.
                             ex reject.