docs: public static void rethrowRuntimeException(Throwable ex) {
          if (ex instanceof RuntimeException) {
              throw (RuntimeException) ex;
          }
          if (ex instanceof Error) {
              throw (Error) ex;
          }
          throw new UndeclaredThrowableException(ex);
      }