Nikolay,

You can also use:

1) Global Exception Registry
ctx.kernalContext().exceptionRegistry().onException(shortMsg, ex);

2) Statistic
final boolean statsEnabled = cctx.config().isStatisticsEnabled();
if (statsEnabled)
   metrics.incrementOnFails();

P.s. Please make sure that code still valid, I found this at 1.6.

On Wed, Aug 30, 2017 at 4:24 PM, Nikolay Izhikov <nizhikov....@gmail.com>
wrote:

> Hello, Yakov.
>
> The new class is OK - got it. Thanks!
>
> > Should we extract a super class?
>
> Yes, we should.
> I already have done it.
>
> See my last commit in PR - https://github.com/apache/igni
> te/pull/2372/commits/af1ed2e4dbef4ba5999f8566198cb75ad922f93b
>
> > We can put hard requirement that filter and transformer cannot throw
> > exception (same as cache interceptor).
>
> I think to cancel the whole query on transformer exception is too much.
> After discussion, I like the idea to skip event if transformer throws
> exception. As far as it "like regular filter" behavior.
>
> Thoughts?
>
>
> 30.08.2017 16:03, Yakov Zhdanov пишет:
>
> I think I have already agreed on a separate class since it seems to be the
>> only option due to generics issue. Should we extract a super class?
>>
>> We can put hard requirement that filter and transformer cannot throw
>> exception (same as cache interceptor). If exception is thrown then we
>> cancel the query globally and unregister all the listeners. This may sound
>> too much but inconsistencies brought by listener notifications may be
>> terrible for app.
>>
>> --Yakov
>>
>>

Reply via email to