Class ExceptionHandlers

java.lang.Object
io.jmix.ui.exception.ExceptionHandlers

public class ExceptionHandlers extends Object
Class that holds the collection of exception handlers and delegates unhandled exception processing to them. Handlers form the chain of responsibility.

An instance of this class is bound to App.

  • Field Details

  • Constructor Details

    • ExceptionHandlers

      public ExceptionHandlers(App app, org.springframework.context.ApplicationContext applicationContext)
  • Method Details

    • getDefaultHandler

      public DefaultExceptionHandler getDefaultHandler()
      Returns:
      default exception handler which is used when none of registered handlers have handled an exception
    • setDefaultHandler

      public void setDefaultHandler(DefaultExceptionHandler defaultHandler)
      Set the default handler instead of initialized in constructor.
      Parameters:
      defaultHandler - default handler instance
    • addHandler

      @Deprecated public void addHandler(ExceptionHandler handler)
      Deprecated.
    • addHandler

      public void addHandler(UiExceptionHandler handler)
      Adds new handler if it is not yet registered.
      Parameters:
      handler - handler instance
    • handle

      public void handle(com.vaadin.server.ErrorEvent event)
      Delegates exception handling to registered handlers.
      Parameters:
      event - error event generated by Vaadin
    • createByConfiguration

      public void createByConfiguration()
      Register all exception handlers.
    • removeAll

      public void removeAll()
      Remove all handlers.