Class RuntimeExceptionWithMessageId

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jp.ecuacion.lib.core.exception.unchecked.RuntimeExceptionWithMessageId
All Implemented Interfaces:
Serializable

public class RuntimeExceptionWithMessageId extends RuntimeException
Is used when you want to throw RuntimeException, but message is deifned in .properties.

When you want throw RuntimeException, you can use RuntimeSystemException. So it is not clear when to use RuntimeExceptionWithMessageId, but it is kept for the time being. May be deprecated in the future.

See Also:
  • Constructor Details

    • RuntimeExceptionWithMessageId

      public RuntimeExceptionWithMessageId(@Nonnull String messageId)
      Constructs a new instance with messageId.
      Parameters:
      messageId - message ID
    • RuntimeExceptionWithMessageId

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

      public RuntimeExceptionWithMessageId(@Nonnull Locale locale, @Nonnull String messageId)
      Constructs a new instance with locale and messageId.
      Parameters:
      locale - locale
      messageId - message ID
    • RuntimeExceptionWithMessageId

      public RuntimeExceptionWithMessageId(@Nonnull Locale locale, @Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with locale, messageId and messageArgs.
      Parameters:
      locale - locale
      messageId - message ID
      messageArgs - message Arguments
  • Method Details

    • getMessageId

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

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

      @Nonnull public String[] getMessageArgs()
      Gets messageArgs.
      Returns:
      message Arguments