#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Fri, 22 Feb 2019 17:16:19 +0100
changeset 8637 25630ec531af
parent 8636 1853419df3c0
child 8638 9981f5698198
#BUGFIX by stefan class: ResourcePack changed: #readFromResourceStream:in: avoid DNU in short context chain
ResourcePack.st
--- a/ResourcePack.st	Fri Feb 22 16:26:34 2019 +0100
+++ b/ResourcePack.st	Fri Feb 22 17:16:19 2019 +0100
@@ -408,7 +408,7 @@
     |fullName pack rsrcDir file|
 
     package isNil ifTrue:[
-        '[ResourcePack] warning: nil package asking for resource file'.
+        "/ '[ResourcePack] warning: nil package asking for resource file'.
         defaultIfAbsentBoolean ifFalse:[^ nil].
         ^ self newDefaultResourcePackForPackage:package
     ].
@@ -1769,19 +1769,18 @@
     pushedSkipValues := OrderedCollection new.
 
     errorHandler := [:ex |
-                        |con|
+                        |con count|
 
-                        Transcript showCR:('ResourcePack [warning]: ''' , ex description , '''') "errorPrintCR".
-                        Transcript showCR:('ResourcePack [info]: file: ' , inStream pathName printString , ' line: ' , lineNumber printString , ': ''' , lineString , '''') "errorPrintCR".
+                        Logger warning:('ResourcePack [warning]: ''' , ex description , '''').
+                        Logger info:('ResourcePack [info]: file: ' , inStream pathName printString , ' line: ' , lineNumber printString , ': ''' , lineString , '''') "errorPrintCR".
                         con := ex suspendedContext.
-                        Transcript showCR:('ResourcePack [info]: in: ' , con fullPrintString) "errorPrintCR".
+                        Logger info:('ResourcePack [info]: in: ' , con fullPrintString).
                         con := con sender.
-                        Transcript showCR:('ResourcePack [info]:   : ' , con fullPrintString) "errorPrintCR".
-                        30 timesRepeat:[
-                            con notNil ifTrue:[
-                                con := con sender.
-                                Transcript showCR:('ResourcePack [info]:   : ' , con fullPrintString) "errorPrintCR".
-                            ].
+                        count := 1.
+                        [con notNil and:[count <= 20]] whileTrue:[
+                            Logger info:('ResourcePack [info]:   : ' , con fullPrintString) .
+                            count := count + 1.
+                            con := con sender.
                         ].    
                         value := nil.
                         ok := false.
@@ -1909,7 +1908,7 @@
     "Modified: / 31-08-1995 / 02:33:45 / claus"
     "Modified: / 18-09-2006 / 20:35:37 / cg"
     "Modified: / 10-10-2018 / 14:14:00 / sr"
-    "Modified: / 22-02-2019 / 16:26:16 / Stefan Vogel"
+    "Modified: / 22-02-2019 / 17:13:13 / Stefan Vogel"
 ! !