Class BGMessageException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.bgerp.app.exception.BGMessageException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BGIllegalArgumentException, BGMessageExceptionTransparent

public class BGMessageException extends Exception
Localized message, shown to end user and not written in log.
See Also:
  • 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