[squeak-dev] what is Exception>>#return:?

Alejandro F. Reimondo aleReimondo at smalltalking.net
Thu Nov 21 11:39:02 UTC 2013


Hi Chris,

>    do: [ : err | err return: nil ]

 #on:do: send will return the result of sending
 #return: message to the object that is named
 "err" in the argument context...
 incase that message succeded to return... ;-)

>    do: [ : err | nil ]

is granted to return nil by "black box magic" of exceptions
 mechanism; and there is no way to change that
 without modifying the method.

cheers,
Ale.


----- Original Message ----- 
From: "Chris Muller" <asqueaker at gmail.com>
To: "squeak dev" <squeak-dev at lists.squeakfoundation.org>
Sent: Wednesday, November 20, 2013 10:59 PM
Subject: [squeak-dev] what is Exception>>#return:?


> What is the difference between:
> 
> [ "something" ]
>    on: Error
>    do: [ : err | err return: nil ]
> 
> and:
> 
> [ "something" ]
>    on: Error
>    do: [ : err | nil ]
> 
> ?
> 
> Thanks.
> 
>



More information about the Squeak-dev mailing list