Class AppWarningException

java.lang.Object
java.lang.Throwable
java.lang.Exception
jp.ecuacion.lib.core.exception.checked.AppWarningException
All Implemented Interfaces:
Serializable

public class AppWarningException extends Exception
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 occured 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 Details

    • messageId

      protected String messageId
      message ID.
    • messageArgs

      protected String[] messageArgs
      message Arguments.
    • locale

      protected Locale locale
      locale.
    • fields

      protected AppExceptionFields fields
      fields.
  • Constructor Details

    • AppWarningException

      public AppWarningException(@Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with messageId and messageArgs.
      Parameters:
      messageId - message ID
      messageArgs - message Arguments
    • AppWarningException

      public AppWarningException(@RequireNonnull Locale locale, @Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with warn fields, messageId and message Arguments.
      Parameters:
      locale - locale. May be null, which means default locale is used. designated.
      messageId - messageId. Cannot be null.
      messageArgs - message Arguments. May be null, which means no message arguments designated.
  • Method Details

    • getLocale

      @Nonnull public Locale getLocale()
      Returns locale.
      Returns:
      locale
    • getMessageId

      @Nonnull public String getMessageId()
      Returns messageId.
      Returns:
      message ID
    • getMessageArgs

      @Nonnull public String[] getMessageArgs()
      Returns messageArgs.
      Returns:
      message arguments
    • fields

      @Nonnull public AppExceptionFields fields()
      Returns fields.
      Returns:
      fields
    • fields

      @Nonnull public AppWarningException fields(@Nullable AppExceptionFields fields)
      Sets fields and return this instance to realize the method chain.
      Returns:
      AppWarningException