code: public void handleThrowable(Throwable e, Object target) {
          try {
              ExceptionCallback exceptionCallback = (ExceptionCallback) target;
              if (e instanceof Exception) {
                  exceptionCallback.exceptionThrown((Exception) e);
              } else {
                  exceptionCallback.exceptionThrown(new RuntimeException(e));
              }
          } catch (IllegalArgumentException | ClassCastException e1) {
              log.fatal("unable to provide callback for: " + target.toString(), e);
          }
      }
docs: tries everything to log the exception
  @param e the Throwable
  @param target an instance of the thing which has thrown the Exception