help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] exceptions


From: Robin Redeker
Subject: [Help-smalltalk] exceptions
Date: Tue, 31 Oct 2006 19:00:32 +0100
User-agent: Mutt/1.5.11+cvs20060403

Hi,

i recently had a weird endless loop when catching exceptions,
it basically came down to this:

   [ self error: 'foo' ] on: 1 do: [ :ex | ex return ]

This goes into an infinite loop. Is that expected behavior?

When ctrl-c'ing i got this _very long_ cyclic backtrace:

   ...
   MessageNotUnderstood(Exception)>>#signal
   SmallInteger(Object)>>#doesNotUnderstand:
   optimized [] in BlockClosure class>>#exceptionHandlerSearchBlock
   [] in CoreException>>#instantiateNextHandler:
   MethodContext(ContextPart)>>#scanBacktraceForAttribute:do:
   CoreException>>#instantiateNextHandler:
   MessageNotUnderstood(Exception)>>#signal
   SmallInteger(Object)>>#doesNotUnderstand:
   optimized [] in BlockClosure class>>#exceptionHandlerSearchBlock
   [] in CoreException>>#instantiateNextHandler:
   MethodContext(ContextPart)>>#scanBacktraceForAttribute:do:
   CoreException>>#instantiateNextHandler:
   MessageNotUnderstood(Exception)>>#signal
   ...

So basically the object 1 doesn't understand some exception handling
message and throws an exception itself, which seems to trigger the
handler again. - I would expect that a exception thrown while catching
one (where the catching process fails) would throw that exception so
that it doesn't trigger the same catching process. But maybe i'm just
plain wrong with my expectations.

Robin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]