Module jp.ecuacion.lib.core
Class AppWarningException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jp.ecuacion.lib.core.exception.checked.AppWarningException
- All Implemented Interfaces:
Serializable
Provides an exception that indicates a warning.
This is used in web apps. When some business logic throws this warning exception, the app shows the warning popup window on screen and proceed when a user presses "OK".
It is not a child of AppException
because AppException means an error occurred in a business logic
but AppWarningException doesn't mean it.
Localized message is needed for this,
so the class is the same constructure as BizLogicAppException.
MultipleAppException for warning does not seem to be needed so it does not exist.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AppExceptionItemIdsitemIds.protected Localelocale.protected String[]message Arguments.protected Stringmessage ID. -
Constructor Summary
ConstructorsConstructorDescriptionAppWarningException(String messageId, String... messageArgs) Constructs a new instance withmessageIdandmessageArgs.AppWarningException(Locale locale, String messageId, String... messageArgs) Constructs a new instance with warn itemIds, messageId and message Arguments. -
Method Summary
Modifier and TypeMethodDescriptionReturns locale.String[]Returns messageArgs.Returns messageId.itemIds()Returns itemIds.itemIds(AppExceptionItemIds itemIds) Sets itemIds and return this instance to realize the method chain.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
messageId
message ID. -
messageArgs
message Arguments. -
locale
locale. -
itemIds
itemIds.
-
-
Constructor Details
-
AppWarningException
Constructs a new instance withmessageIdandmessageArgs.- Parameters:
messageId- message IDmessageArgs- message Arguments
-
AppWarningException
public AppWarningException(@RequireNonnull Locale locale, @Nonnull String messageId, @Nonnull String... messageArgs) Constructs a new instance with warn itemIds, messageId and message Arguments.- Parameters:
locale- locale. May be null, which means default locale is used. designated.messageId- messageId. Cannot benull.messageArgs- message Arguments. May be null, which means no message arguments designated.
-
-
Method Details
-
getLocale
Returns locale.- Returns:
- locale
-
getMessageId
Returns messageId.- Returns:
- message ID
-
getMessageArgs
Returns messageArgs.- Returns:
- message arguments
-
itemIds
Returns itemIds.- Returns:
- itemIds
-
itemIds
Sets itemIds and return this instance to realize the method chain.- Returns:
- AppWarningException
-