Cache unhandled exception

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cache unhandled exception

AndreyVel
I have question about https://issues.apache.org/jira/browse/IGNITE-2079

Sametime need send notification for client listener about unhandled
exception,  what do you think if to add new class CacheExceptionEvent ?
Maybe there is more convenient event type/name ?

Server code
     CacheExceptionEvent evt = new CacheExceptionEvent(node, shortMsg,
ex, EVT_UNHANDLED_EXCEPTION);
     ctx.event().record(evt);

Client code example

grid(0).events().localListen(new IgnitePredicate<Event>() {
     @Override public boolean apply(Event event) {
         . . .          return true;
     }
}, EventType.EVT_UNHANDLED_EXCEPTION);

Reply | Threaded
Open this post in threaded view
|

Re: Cache unhandled exception

Denis Magda
I would add new event like UnhandledExceptioEvent. Presently it will be used for your scenario however in the future it can be reused for other cases.

Other thoughts?


Denis

> On Jul 11, 2016, at 7:26 PM, AndreyVel <[hidden email]> wrote:
>
> I have question about https://issues.apache.org/jira/browse/IGNITE-2079
>
> Sametime need send notification for client listener about unhandled exception,  what do you think if to add new class CacheExceptionEvent ?
> Maybe there is more convenient event type/name ?
>
> Server code
>    CacheExceptionEvent evt = new CacheExceptionEvent(node, shortMsg, ex, EVT_UNHANDLED_EXCEPTION);
>    ctx.event().record(evt);
>
> Client code example
>
> grid(0).events().localListen(new IgnitePredicate<Event>() {
>    @Override public boolean apply(Event event) {
>        . . .          return true;
>    }
> }, EventType.EVT_UNHANDLED_EXCEPTION);
>