Class GlobalExceptionHandlerSlf4j

java.lang.Object
io.github.mmm.base.exception.GlobalExceptionHandlerSlf4j
All Implemented Interfaces:
GlobalExceptionHandler

public class GlobalExceptionHandlerSlf4j extends Object implements GlobalExceptionHandler
Implementation of GlobalExceptionHandler using SLF4J Logger.
  • Constructor Details

    • GlobalExceptionHandlerSlf4j

      public GlobalExceptionHandlerSlf4j()
  • Method Details

    • handleError

      public void handleError(Object context, Throwable error)
      Description copied from interface: GlobalExceptionHandler
      This 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:
      handleError in interface GlobalExceptionHandler
      Parameters:
      context - is an Object with information about the context when the error occurred. Its string representation should 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 be null if no context information is available.
      error - is the error that has been catched and shall be handled.