Package io.jmix.flowui.exception
Class DefaultUiExceptionHandler
java.lang.Object
io.jmix.flowui.exception.DefaultUiExceptionHandler
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component("flowui_DefaultExceptionHandler")
public class DefaultUiExceptionHandler
extends Object
implements org.springframework.context.ApplicationContextAware
A default implementation of a user interface exception handler in the framework.
This class handles exceptions thrown during the application's operation and provides a way
to display an appropriate dialog for the user. It uses exception dialog providers to determine
and display a dialog for a specific exception or its root cause. If no specific dialog is provided
for an exception, a default exception dialog is used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected List<ExceptionDialogProvider> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultUiExceptionHandler(List<ExceptionDialogProvider> exceptionDialogProviders) -
Method Summary
Modifier and TypeMethodDescriptionprotected ExceptionDialoggetDefaultExceptionDialog(Throwable throwable) protected ExceptionDialoggetExceptionDialog(Throwable throwable) booleanHandles the given exception and determines the appropriate action based on its type.protected voidopenExceptionDialog(Throwable throwable) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
exceptionDialogProviders
-
-
Constructor Details
-
DefaultUiExceptionHandler
public DefaultUiExceptionHandler(@Autowired(required=false) List<ExceptionDialogProvider> exceptionDialogProviders)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
handle
Handles the given exception and determines the appropriate action based on its type.- Parameters:
exception- the exception to handle- Returns:
trueif the exception is handled;falseif not handled
-
openExceptionDialog
-
getExceptionDialog
-
getDefaultExceptionDialog
-