Last active
November 30, 2017 14:17
-
-
Save joergi/31cd6edbe70230e41a7972e633b7547e to your computer and use it in GitHub Desktop.
ErrorInterceptor.java should catch all exceptions as in an normalen https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package errortest.de.joergi.errors; | |
import org.springframework.web.bind.annotation.ControllerAdvice; | |
import org.springframework.web.bind.annotation.ExceptionHandler; | |
import lombok.extern.slf4j.Slf4j; | |
@Slf4j | |
@ControllerAdvice | |
public class ErrorInterceptor { | |
@ExceptionHandler(Exception.class) | |
public void exceptionHandler() { | |
log.info("Exception was thrown"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment