/** * Creates a runtime {@link RejectedExecutionException} for {@link ExecutionRejectedException}. * This version takes the {@link ExecutionRejectedException#isFatal()} value into account * and creates {@link FatalRejectedExecutionException} if required. * @param message Message * @param cause Base non-Runtime exception * @return Created Runtime exception */ @Nonnull public static RejectedExecutionException createRuntimeException( @Nonnull String message, @Nonnull ExecutionRejectedException cause) { if (cause.isFatal()) { return new FatalRejectedExecutionException(message, cause); } else { return new RejectedExecutionException(message, cause); } }
LOGGER.log(Level.SEVERE, message, ex); if (ex.isFatal()) {