#UI_ENHANCEMENT by exept
authorClaus Gittinger <cg@exept.de>
Fri, 23 Aug 2019 21:49:11 +0200
changeset 6680 dcc57d757c4c
parent 6679 5036ddf57f20
child 6681 15155b2f3dc7
#UI_ENHANCEMENT by exept class: TextCollector added: #classDisplayString changed: #doesNotUnderstand: better presentation of DNU
TextCollector.st
--- a/TextCollector.st	Fri Aug 23 01:53:31 2019 +0200
+++ b/TextCollector.st	Fri Aug 23 21:49:11 2019 +0200
@@ -487,6 +487,15 @@
     "Modified: / 06-06-2019 / 10:21:08 / Claus Gittinger"
 ! !
 
+!TextCollector methodsFor:'printing'!
+
+classDisplayString
+    self == Transcript ifTrue:[
+        ^ 'Transcript (a ',super classDisplayString,')'
+    ].
+    ^ super classDisplayString
+! !
+
 !TextCollector methodsFor:'private'!
 
 checkLineLimit
@@ -781,7 +790,21 @@
      on to the stream which will send the characters via nextPut:
      This way, we understand all Stream messages - great isn't it!!"
 
-    ^ aMessage sendTo:entryStream
+    "/ catch and re-raise, so to the debugger it will look as if it was
+    "/ raised here (in case the ActorStream also does not implement it.
+    "/ Thus the debugger will show the caller as responsible, instead of me.
+    [
+        ^ aMessage sendTo:entryStream
+    ] on:MessageNotUnderstood do:[:ex |
+        ex selector == aMessage selector ifTrue:[
+            ex originator == entryStream ifTrue:[
+                ex originator:self.
+                ^ ex raiseSignalIn:ex handlerContext.
+                ^ super doesNotUnderstand:aMessage
+            ]
+        ].
+        ex reject
+    ].
 !
 
 ensureCr