Example usage for org.springframework.security.web.util ThrowableCauseExtractor ThrowableCauseExtractor

List of usage examples for org.springframework.security.web.util ThrowableCauseExtractor ThrowableCauseExtractor

Introduction

In this page you can find the example usage for org.springframework.security.web.util ThrowableCauseExtractor ThrowableCauseExtractor.

Prototype

ThrowableCauseExtractor

Source Link

Usage

From source file:grails.plugin.springsecurity.web.access.DefaultThrowableAnalyzer.java

@Override
protected void initExtractorMap() {
    super.initExtractorMap();

    registerExtractor(ServletException.class, new ThrowableCauseExtractor() {
        public Throwable extractCause(Throwable throwable) {
            ThrowableAnalyzer.verifyThrowableHierarchy(throwable, ServletException.class);
            return ((ServletException) throwable).getRootCause();
        }//  www .  j  ava2 s .c  o  m
    });
}