Package org.apache.groovy.json.internal

# Class Exceptions.JsonInternalException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.json.JsonException
org.apache.groovy.json.internal.Exceptions.JsonInternalException

All Implemented Interfaces:
  `Serializable`

Enclosing class:
  Exceptions

public static class Exceptions.JsonInternalException extends JsonException
Runtime exception used inside the JSON internals to simplify propagation.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JsonInternalException(String message)`
  Creates an exception with the supplied message.
  `JsonInternalException(String message, Throwable cause)`
  Creates an exception with the supplied message and cause.
  `JsonInternalException(Throwable cause)`
  Creates an exception that wraps another throwable.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Throwable`
  `getCause()`
  Returns the wrapped cause.
  `String`
  `getLocalizedMessage()`
  Returns the localized message.
  `String`
  `getMessage()`
  Returns the message, including the wrapped cause summary when present.
  `StackTraceElement[]`
  `getStackTrace()`
  Returns the wrapped stack trace when a cause is present.
  `void`
  `printStackTrace()`
  Logs the wrapped stack trace.
  `void`
  `printStackTrace(PrintStream s)`
  Prints the wrapped stack trace to the supplied stream.
  `void`
  `printStackTrace(PrintWriter s)`
  Prints the wrapped stack trace to the supplied writer.

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

  `addSuppressed, fillInStackTrace, getSuppressed, initCause, setStackTrace, toString`

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

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

- ## Constructor Details

  - ### JsonInternalException

    public JsonInternalException(String message)
    Creates an exception with the supplied message.
    Parameters:
      `message` - the exception message

  - ### JsonInternalException

    public JsonInternalException(String message, Throwable cause)
    Creates an exception with the supplied message and cause.
    Parameters:
      `message` - the exception message
      `cause` - the wrapped cause

  - ### JsonInternalException

    public JsonInternalException(Throwable cause)
    Creates an exception that wraps another throwable.
    Parameters:
      `cause` - the wrapped cause

- ## Method Details

  - ### printStackTrace

    public void printStackTrace(PrintStream s)
    Prints the wrapped stack trace to the supplied stream.
    Overrides:
      `printStackTrace` in class `Throwable`
    Parameters:
      `s` - the target stream

  - ### getMessage

    public String getMessage()
    Returns the message, including the wrapped cause summary when present.
    Overrides:
      `getMessage` in class `Throwable`
    Returns:
      the formatted exception message

  - ### getLocalizedMessage

    public String getLocalizedMessage()
    Returns the localized message.
    Overrides:
      `getLocalizedMessage` in class `Throwable`
    Returns:
      the localized message

  - ### getStackTrace

    public StackTraceElement[] getStackTrace()
    Returns the wrapped stack trace when a cause is present.
    Overrides:
      `getStackTrace` in class `Throwable`
    Returns:
      the effective stack trace

  - ### getCause

    public Throwable getCause()
    Returns the wrapped cause.
    Overrides:
      `getCause` in class `Throwable`
    Returns:
      the wrapped cause, or `null`

  - ### printStackTrace

    public void printStackTrace(PrintWriter s)
    Prints the wrapped stack trace to the supplied writer.
    Overrides:
      `printStackTrace` in class `Throwable`
    Parameters:
      `s` - the target writer

  - ### printStackTrace

    public void printStackTrace()
    Logs the wrapped stack trace.
    Overrides:
      `printStackTrace` in class `Throwable`