void (@NotNull Exception e) { Throwable unwrapped = e; if (e instanceof InvocationTargetException) { unwrapped = e.getCause() == null ? e : e.getCause(); } ExceptionUtil.rethrowUnchecked(unwrapped); LOG.error(unwrapped); }