```java
 public Result thenApplyWithContext(Function<Result, Result> fn) {
        this.thenApply(fn.compose(beforeContext).andThen(afterContext));
        // You may need to return a new Result instance representing the next async stage,
        // like thenApply will return a new CompletableFuture.
        return this;
    }
```

to

```java
```java
 public Result thenApplyWithContext(BiFunction<Throwable, Result> fn) {
        this.handle(fn);
        // You may need to return a new Result instance representing the next async stage,
        // like thenApply will return a new CompletableFuture.
        return this;
    }
```
```
/**
     * Get invoke result.
     *
     * @return result. if no result return null.
     */
    Object getValue();
    void setValue(Object value);
    /**
     * Get exception.
     *
     * @return exception. if no exception return null.
     */
    Throwable getException();
    void setException(Throwable t);
    /**
     * Has exception.
     *
     * @return has exception.
     */
    boolean hasException();
    /**
     * Recreate.
     * <p>
     * <code>
     * if (hasException()) {
     * throw getException();
     * } else {