Hi,
Because when you are receiving a DNU, you have the possibility to implement the method before resuming the exception.
If you choose to implement the method, the message is sent again to the newly created method and the execution restarts.
Vincent
De : Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org]
De la part de Denis Kudriashov
Envoy�� : jeudi 25 f��vrier 2016 17:56
�� : Discusses Development of Pharo
Objet : [Pharo-dev] Recursion inside #doesNotUnderstand: method. Why?
Hi.
Does anybody know why #doesNotUnderstand: is implemented with recursion at the end?
doesNotUnderstand: aMessage
| exception resumeValue |
(exception := MessageNotUnderstood new)
message: aMessage;
receiver: self.
resumeValue := exception signal.
^exception reachedDefaultHandler
ifTrue: [aMessage sentTo: self]
ifFalse: [resumeValue].
Best regards,
Denis