You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by AndreyVel <an...@gmail.com> on 2016/07/11 16:26:20 UTC
Cache unhandled exception
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);
Re: Cache unhandled exception
Posted by Denis Magda <dm...@gridgain.com>.
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 <an...@gmail.com> 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);
>