You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Ilya Kasnacheev <il...@gmail.com> on 2018/02/15 12:40:05 UTC

Wrapping [Ignite]Interrupted[Checked]Exception in benign exceptions

Hello Igniters.

I have stumbled on the problem for which I have created a ticket
https://issues.apache.org/jira/browse/IGNITE-7719

Basically it is an awful code smell. On thread interrupt, we wrap
InterruptedException with some unrelated exception type, which prevents it
from being handled properly by client code. Especially bad since we use
thread interruption for client code workflow, e.g. in service grid.

Hope to hear your opinions on this,

-- 
Ilya Kasnacheev

Re: Wrapping [Ignite]Interrupted[Checked]Exception in benign exceptions

Posted by Александр Меньшиков <sh...@gmail.com>.
Ilya, I agree with you about reducing the number of unchecked exceptions in
public API. Because when you work with grid it can throw about 4 types of
different runtime exception. And there is no way except experiments to know
about this types.

2018-02-15 15:57 GMT+03:00 Dmitriy Setrakyan <ds...@apache.org>:

> Ilya, i have looked at the ticket. I am not sure I understand what you are
> suggesting. Can you provide a "before" and "after" example?
>
> D.
>
> On Thu, Feb 15, 2018 at 4:40 AM, Ilya Kasnacheev <
> ilya.kasnacheev@gmail.com>
> wrote:
>
> > Hello Igniters.
> >
> > I have stumbled on the problem for which I have created a ticket
> > https://issues.apache.org/jira/browse/IGNITE-7719
> >
> > Basically it is an awful code smell. On thread interrupt, we wrap
> > InterruptedException with some unrelated exception type, which prevents
> it
> > from being handled properly by client code. Especially bad since we use
> > thread interruption for client code workflow, e.g. in service grid.
> >
> > Hope to hear your opinions on this,
> >
> > --
> > Ilya Kasnacheev
> >
>

Re: Wrapping [Ignite]Interrupted[Checked]Exception in benign exceptions

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Ilya, i have looked at the ticket. I am not sure I understand what you are
suggesting. Can you provide a "before" and "after" example?

D.

On Thu, Feb 15, 2018 at 4:40 AM, Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello Igniters.
>
> I have stumbled on the problem for which I have created a ticket
> https://issues.apache.org/jira/browse/IGNITE-7719
>
> Basically it is an awful code smell. On thread interrupt, we wrap
> InterruptedException with some unrelated exception type, which prevents it
> from being handled properly by client code. Especially bad since we use
> thread interruption for client code workflow, e.g. in service grid.
>
> Hope to hear your opinions on this,
>
> --
> Ilya Kasnacheev
>