Class GeneralException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.ofbiz.core.util.GeneralException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GenericConfigException

public class GeneralException extends Exception
Base OFBiz Exception, provides nested exceptions, etc Created November 5, 2001
Version:
1.0
Author:
Andy Zeneski
See Also:
  • Constructor Details

    • GeneralException

      public GeneralException()
      Creates new GeneralException without detail message.
    • GeneralException

      public GeneralException(String msg)
      Constructs an GeneralException with the specified detail message.
      Parameters:
      msg - the detail message.
    • GeneralException

      public GeneralException(String msg, Throwable nested)
      Constructs an GeneralException with the specified detail message and nested Exception.
      Parameters:
      msg - the detail message.
    • GeneralException

      public GeneralException(Throwable nested)
      Constructs an GeneralException with the specified detail message and nested Exception.
  • Method Details

    • getMessage

      public String getMessage()
      Returns the detail message, including the message from the nested exception if there is one.
      Overrides:
      getMessage in class Throwable
    • getNonNestedMessage

      public String getNonNestedMessage()
      Returns the detail message, NOT including the message from the nested exception.
    • getNested

      public Throwable getNested()
      Returns the nested exception if there is one, or this if there is not.

      Note: In earlier versions, this class incorrectly documented that it returned null when there was no nested exception. This was a lie; it has always returned this for that case. Note also that this behaviour is not consistent with that of GeneralRuntimeException.

    • printStackTrace

      public void printStackTrace()
      Prints the composite message to System.err.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintStream ps)
      Prints the composite message and the embedded stack trace to the specified stream ps.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintWriter pw)
      Prints the composite message and the embedded stack trace to the specified print writer pw.
      Overrides:
      printStackTrace in class Throwable