code: private static void throwRuntimeException(String msg, InvocationTargetException e) {
      Throwable cause = e.getCause();
      if (cause != null) {
        throw new RuntimeException(msg + ": " + cause.getMessage(), cause);
      } else {
        throw new RuntimeException(msg + ": " + e.getMessage(), e);
      }
    }
docs: Throw a {@link RuntimeException} with given message and cause lifted from an {@link
  InvocationTargetException}. If the specified {@link InvocationTargetException} does not have a
  cause, neither will the {@link RuntimeException}.