Sending a message is a two-step process:
doesNotUnderstand: is sent to the receiver
node1 coucou: #stef
coucou: looked up in NodeNode -> continues in ObjectObject -> send doesNotUnderstand: to node1doesNotUnderstand: looked up in NodeNode -> continues in ObjectdoesNotUnderstand: is found and executed
doesNotUnderstand: is a message
When no class redefines doesNotUnderstand:
doesNotUnderstand: in Object is executedMessageNotUnderstood exception
MessageNotUnderstood is just an exception, code can handle it:
Node >> sayHello
self coucou: #stef
Node >> welcome
[ self sayHello ]
on: MessageNotUnderstood
do: [ Transcript show: 'Something went wrong with a message' ]
doesNotUnderstand: when it can not find a methoddoesNotUnderstand: raises an exception that can be handled/