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:
  • 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