Hi,

I've been reading about the smalltalk exceptions thanks to some suggestions
received in this list.

While  reading
https://gforge.inria.fr/frs/download.php/26600/PBE2-Exceptions-2010-03-02.pdf(page
9) I found the implementation for
*Object>>doesNotUnderstand *but there is something I don't understand and
I'm wondering if someone can help me.

Object»doesNotUnderstand: aMessage
"Handle the fact that there was an attempt to send the given message to the
receiver
but the receiver does not understand this message (typically sent from the
machine
when a message is sent to the receiver and no method is defined for that
selector).
"
MessageNotUnderstood new
message: aMessage;
receiver: self;
signal.
↑ aMessage sentTo: self.

I'm having problem with the line in red. The method is pretty simple, it
just create a new MessageNotUnderstood instance and then send the message:
and receiver: messages, but it also *signal *the exception, which I was
thinking will finish the method execution, but if that's the case, Why the
red line? Why returning anything after signaling the exception?

Regards,
Erlis
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to