Package eu.europeana.apikey.exception
Class GlobalExceptionHandler
- java.lang.Object
-
- eu.europeana.apikey.exception.GlobalExceptionHandler
-
@ControllerAdvice public class GlobalExceptionHandler extends Object
Global exception handler that catches all errors and logs the interesting ones- Author:
- Patrick Ehlert Created on 18 nov 2019
-
-
Constructor Summary
Constructors Constructor Description GlobalExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleApiKeyException(javax.servlet.http.HttpServletResponse response, ApiKeyException e)Checks if we should log an error (and its stacktrace) and rethrows it
-
-
-
Method Detail
-
handleApiKeyException
@ExceptionHandler(ApiKeyException.class) public void handleApiKeyException(javax.servlet.http.HttpServletResponse response, ApiKeyException e) throws ApiKeyException
Checks if we should log an error (and its stacktrace) and rethrows it- Parameters:
e- caught exception- Throws:
ApiKeyException- rethrown exception
-
-