[squeak-dev] Decompiler failure

Tobias Pape Das.Linux at gmx.de
Tue Nov 4 08:16:21 UTC 2014


On 04.11.2014, at 06:19, Marcel Taeumel <marcel.taeumel at student.hpi.uni-potsdam.de> wrote:

> What's the semantics of this piece of Smalltalk code? o.O
> If "aTryBlock value" raises an error, retry will be set to "true" for all
> non-network errors. But then? There is no resume. Hmm... Cannot figure out
> why this will be retried only once? Should be retried forever then? Is there
> some implicity magic hidden somewhere? :)

The code is plain incorrect. I was debugging it and hence
hit the decompiler bug, because “toggle halt on entry” effects
the browser to try to decompile it (which is fine).
  My working implementation is now this:

retryOnce: aTryBlock
	| again |
	again := true.
	[^ aTryBlock value.
	] on: Error do: [:e |
		((e isKindOf: NetworkError) or: [again not])
			ifTrue: [e pass]
			ifFalse: [again := false. e retry]].

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1625 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141104/9a1e4cf0/signature.pgp

More information about the Squeak-dev mailing list