logging-interceptor icon indicating copy to clipboard operation
logging-interceptor copied to clipboard

Uncaught Exception Handling

Open derekm opened this issue 7 years ago • 1 comments

I don't know how this would be done, but some kind of exception logger for uncaught exceptions would be handy.

I think DeltaSpike has something for handling exceptions globally, but I wanted to ping this project for ideas.

derekm avatar Apr 05 '18 16:04 derekm

There's Thread#setUncaughtExceptionHandler and Thread#setDefaultUncaughtExceptionHandler to do that, but in a CDI environment, I think this would already be set up by the container, i.e. by JEE, and while it may be easy to wrap the default handler, I don't think we can wrap the per-thread handler, as we don't get notified when the container creates a new thread.

What exactly do you need, and in what environment are you running your code?

t1 avatar Apr 06 '18 07:04 t1