java.lang.Object
io.github.mmm.base.exception.GlobalExceptionHandlerSlf4j
- All Implemented Interfaces:
GlobalExceptionHandler
Implementation of
GlobalExceptionHandler using SLF4J Logger.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(Object context, Throwable error) This method handles an error that occurred in a generic component that can not handle it in a specific way.
-
Constructor Details
-
GlobalExceptionHandlerSlf4j
public GlobalExceptionHandlerSlf4j()
-
-
Method Details
-
handleError
Description copied from interface:GlobalExceptionHandlerThis method handles an error that occurred in a generic component that can not handle it in a specific way.
In a typical server application you may like to log the errors while in a client application you might want to show a popup that displays the error.- Specified by:
handleErrorin interfaceGlobalExceptionHandler- Parameters:
context- is an Object with information about the context when the error occurred. Itsstring representationshould be human readable and give additional hints to track down the error. E.g. the source or parameters of an operation where the error occurred. This parameter may also benullif no context information is available.error- is theerrorthat has been catched and shall be handled.
-