-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
for: backport-to-4.3.xIssues that will be back-ported to the 4.3.x lineIssues that will be back-ported to the 4.3.x linefor: backport-to-5.0.xIssues that will be back-ported to the 5.0.x lineIssues that will be back-ported to the 5.0.x linein: infrastructuretype: bug
Milestone
Description
Cyril Dejonghe opened BATCH-2479 and commented
I'm facing a case where unwrapIfRethrown() returns null (initial exception with no cause) :
/**
* Unwraps the throwable if it has been wrapped by
* {@link #rethrow(Throwable)}.
*/
private static Throwable unwrapIfRethrown(Throwable throwable) {
if (throwable instanceof RepeatException) {
return throwable.getCause();
}
else {
return throwable;
}
}
This causes doHandle() to fail :
private void doHandle(Throwable throwable, RepeatContext context, Collection<Throwable> deferred) {
// An exception alone is not sufficient grounds for not continuing
Throwable unwrappedThrowable = unwrapIfRethrown(throwable);
try {
...
if (logger.isDebugEnabled()) {
logger.debug("Handling exception: " + throwable.getClass().getName() + ", caused by: " + unwrappedThrowable.getClass().getName() + ": " + unwrappedThrowable.getMessage());
}
exceptionHandler.handleException(context, unwrappedThrowable);
} catch (Throwable handled) {
deferred.add(handled);
}
}
The cause seem pretty clear : calling unwrappedThrowable.getClass().getName() + ": " + unwrappedThrowable.getMessage() on a null object ...
Affects: 3.0.6
Metadata
Metadata
Assignees
Labels
for: backport-to-4.3.xIssues that will be back-ported to the 4.3.x lineIssues that will be back-ported to the 4.3.x linefor: backport-to-5.0.xIssues that will be back-ported to the 5.0.x lineIssues that will be back-ported to the 5.0.x linein: infrastructuretype: bug