Package org.bgerp.app.exception

# Class BGException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.bgerp.app.exception.BGException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `BGSecurityException`, `CompilerWrapper.CompilationFailedException`, `UnsupportedBillingVersion`

public class BGException extends RuntimeException
Unexpected situation, shown to user and written in log.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BGException()`
  `BGException(String pattern, Object... args)`
  Constructor with pattern and replacements for `Log.format(String, Object...)`.
  `BGException(String message, Throwable cause)`
  Constructor with message and root cause.
  `BGException(Throwable cause)`
  Constructor with root cause to take message from.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `throwNew(String message)`
  For calling from scripts.

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

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- ## Constructor Details

  - ### BGException

    public BGException()

  - ### BGException

    public BGException(String pattern, Object... args)
    Constructor with pattern and replacements for `Log.format(String, Object...)`.
    Parameters:
      `pattern` - message pattern.
      `params` - parameters for replacements in `pattern`.

  - ### BGException

    public BGException(Throwable cause)
    Constructor with root cause to take message from.
    Parameters:
      `cause` - root cause.

  - ### BGException

    public BGException(String message, Throwable cause)
    Constructor with message and root cause.
    Parameters:
      `message` - plain text message.
      `cause` - root cause.

- ## Method Details

  - ### throwNew

    public static void throwNew(String message)
    For calling from scripts.
    Parameters:
      `message` -