Hi,
There is a strange behaviour in the exception handling...
Looking the org.apache.deltaspike.core.api.exception.control.event.
ExceptionStackEvent.init() line 96
current = exceptionStackItems.removeFirst().getThrowable();
This removes the first original exception when handling exception events...
Then when throwing this anywhere:
throw new RuntimeException("RootCause", new RuntimeException("previous
cause"));
or in a normal catch block
} catch (final Exception ex) {
throw new CustomException("previous cause",ex);
}
A method with a param @Handles final ExceptionEvent<Exception> evt
will give the "previous cause" exception... not the RootCause when evt
.getException(); is called
This behaviour and loss of information is really anoying ...
Is this a wanted or a bug ?
Vincent Biertho
Java Team ONEm/RVA
[email protected]
02/515.44.01Disclaimer