Example usage for org.springframework.boot.web.server ErrorPage getException

List of usage examples for org.springframework.boot.web.server ErrorPage getException

Introduction

In this page you can find the example usage for org.springframework.boot.web.server ErrorPage getException.

Prototype

public Class<? extends Throwable> getException() 

Source Link

Document

Returns the exception type (or null for a page that matches by status).

Usage

From source file:org.springframework.boot.web.servlet.support.ErrorPageFilter.java

@Override
public void addErrorPages(ErrorPage... errorPages) {
    for (ErrorPage errorPage : errorPages) {
        if (errorPage.isGlobal()) {
            this.global = errorPage.getPath();
        } else if (errorPage.getStatus() != null) {
            this.statuses.put(errorPage.getStatus().value(), errorPage.getPath());
        } else {/* w  ww . j  a va 2 s. com*/
            this.exceptions.put(errorPage.getException(), errorPage.getPath());
        }
    }
}