Example usage for org.springframework.web.reactive HandlerResult applyExceptionHandler

List of usage examples for org.springframework.web.reactive HandlerResult applyExceptionHandler

Introduction

In this page you can find the example usage for org.springframework.web.reactive HandlerResult applyExceptionHandler.

Prototype

public Mono<HandlerResult> applyExceptionHandler(Throwable failure) 

Source Link

Document

Apply the exception handler and return the alternative result.

Usage

From source file:org.springframework.web.reactive.DispatcherHandler.java

private Mono<Void> handleResult(ServerWebExchange exchange, HandlerResult result) {
    return getResultHandler(result).handleResult(exchange, result).onErrorResume(
            ex -> result.applyExceptionHandler(ex).flatMap(exceptionResult -> getResultHandler(exceptionResult)
                    .handleResult(exchange, exceptionResult)));
}