[squeak-dev] Another simulation discrepancy

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Mon Mar 26 19:39:01 UTC 2012


If you define a method at Object or any class:

--------------------
oOr: choices
	choices do: [:c | [^ c value] on: Error do: []].
--------------------

And print-it the following in a Workspace:

--------------------
Object new oOr: {[self error: 'error from first']. [3+4]}
--------------------

You'll get 7 as the printed result as expected.  But then, try adding
"halt" to it:

--------------------
Object new oOr: {[self halt error: 'error from first']. [3+4]}.
--------------------

and print-it.  Open the debugger by selecting the context for "DoIt"
and press cmd-t twice to simulate the #error: message send, and then
proceed.  You get nil as the result.

-- Yoshiki


More information about the Squeak-dev mailing list