[squeak-dev] Exception return: 10 vs 10
stephane ducasse
stephane.ducasse at free.fr
Mon Jul 21 09:14:54 UTC 2008
Hello
I'm trying to understand the exact difference between using return:
and not as
a last statement of a on:do: block
I read the excellent tests of ExceptionTester (Tx andreas they are
cool).
returning
"self new returning"
^ [self firstActionSignalingAnError.
self secondActionReturning42]
on: Error
do: [:ex | Transcript show: 'An error has occurred: ', ex
messageText ; cr.
ex return: 69]
returning
"self new returning"
^ [self firstActionSignalingAnError.
self secondActionReturning42]
on: Error
do: [:ex | Transcript show: 'An error has occurred: ', ex
messageText ; cr.
69]
More information about the Squeak-dev
mailing list
|