чт, 19 дек. 2019 г. в 00:42, Denis Kudriashov <[email protected]>:

> I think this problem could lead to debugger issues with stepOver and
> stepThrough. For example:
>
> Context>>#stepToHome:
>      ...
>      context := aContext insertSender: (Context
>           contextOn: UnhandledError do: [:ex | ... ])
>
> It is a method which is used for stepThrough. If current method has outer
> handler for Error then the UnhandledError logic will be ignored.
>
> Step over is based on following method:
>
> Context>>runUntilErrorOrReturnFrom: aSender
>            ...
>
> context := aSender insertSender: (Context
>
> contextOn: Error do: [:ex |
>
>    error ifNil: [
>
>    "this is ugly but it fixes the side-effects of not sending an Unhandled
> error on Halt"
>
>    error := (ex isKindOf: UnhandledError) ifTrue: [ ex exception ]
> ifFalse: [ ex ].
> ...
>
> I think UnhandledError branch will never be true:
>
> [ 1/0 ] on: Error do: [:e | e logCr. e3 pass ]
>
> Handler here is executed only once with ZeroDivide error.
>

Sorry, the mistake is here. It's better to copy scripts to the mail. It
should be with Exception. But the result is same - single message in
transcript:

[ 1/0 ] on: Exception do: [:e | e logCr. e pass ]



>

Reply via email to