Package org.bgerp.app.exception

# Class BGMessageException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.bgerp.app.exception.BGMessageException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `BGIllegalArgumentException`, `BGMessageExceptionWithoutL10n`

public class BGMessageException extends Exception
Localized message, shown to end user and not written in log.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BGMessageException(String pattern, Object... args)`
  Constructor with default kernel + plugin localizer.
  `BGMessageException(Localizer lInternal, String pattern, Object... args)`
  Constructor with internal localizer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getLocalizedMessage()`
  Provides exception's message with substituted pattern, but without localization like `getMessage(Localizer)` does.
  `String`
  `getMessage()`
  Provides exception's message with substituted pattern, but without localization like `getMessage(Localizer)` does.
  `String`
  `getMessage(Localizer lExternal)`
  Provides localized message used internal localized `lInternal`, case if exists, or `lExternal`.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### BGMessageException

    public BGMessageException(String pattern, Object... args)
    Constructor with default kernel + plugin localizer.
    Parameters:
      `pattern` - message pattern.
      `args` - message arguments.

  - ### BGMessageException

    public BGMessageException(Localizer lInternal, String pattern, Object... args)
    Constructor with internal localizer.
    Parameters:
      `lInternal` - internal localizer.
      `pattern` - message pattern.
      `args` - message arguments.

- ## Method Details

  - ### getMessage

    public String getMessage(Localizer lExternal)
    Provides localized message used internal localized `lInternal`, case if exists, or `lExternal`.
    Parameters:
      `lExternal` - external localizer.
    Returns:

  - ### getLocalizedMessage

    public String getLocalizedMessage()
    Provides exception's message with substituted pattern, but without localization like `getMessage(Localizer)` does. The method should not be normally called, produces WARN to log output.
    Overrides:
      `getLocalizedMessage` in class `Throwable`
    Returns:

  - ### getMessage

    public String getMessage()
    Provides exception's message with substituted pattern, but without localization like `getMessage(Localizer)` does. The method should not be normally called, produces WARN to log output.
    Overrides:
      `getMessage` in class `Throwable`
    Returns:

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Throwable`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`