code: public static <R> MethodResult<R> failure(Throwable failure) {
          return new MethodResult<>(null, failure, false);
      }
docs: Create a MethodResult for a method which threw an exception
  
  @param failure the exception thrown by the method
  @return the new MethodResult