Hi denis
I do not understand the problem and I'm convinced that you are right
so can anybody explain to me the point made by denis?

Stef

Le 7/1/16 13:11, Denis Kudriashov a écrit :
Hi

I look at implementation of BlockClosure>>ifError: . I did't know that it culls arguments to errorBlock. But what is this arguments? It is not error instance but specific properties from it.

    BlockClosure>>ifError: errorHandlerBlock

    ^ self on: Error do: [:ex |
    errorHandlerBlock cull: ex description cull: ex receiver]


Why people doing that?
Many users of it just pass given error like

    [...] ifError: [:msg :rcv | ...

         rcv error: msg].


Especially it is commonly used scenario by senders of #critical:ifError:. But it is different question.
I propose change ifError: to cull error instance.

What you think? Can be put it in Pharo 5? Such change can touch some packages

Reply via email to