Class GeneralException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.ofbiz.base.util.GeneralException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthenticatorException, CartItemModifyException, DataFileException, EventHandlerException, GeneralServiceException, GenericConfigException, GenericEntityException, GenericServiceException, HttpClientException, ItemNotFoundException, JobManagerException, MiniLangException, RecurrenceInfoException, RecurrenceRuleException, RequestHandlerException, RequestHandlerExceptionAllowExternalRequests, ScreenRenderException, SecurityConfigurationException, SerializeException, SurveyWrapper.SurveyWrapperException, ViewHandlerException, WebAppConfigurationException, WebPosSession.UserLoginFailure

public class GeneralException extends Exception
Base OFBiz Exception, provides nested exceptions, etc
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.
      nested - the nested exception.
    • GeneralException

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

      public GeneralException(String msg, List<String> messages)
      Constructs an GeneralException with the specified detail message, list and nested Exception.
      Parameters:
      msg - the detail message.
      messages - error message list.
    • GeneralException

      public GeneralException(String msg, List<String> messages, Throwable nested)
      Constructs an GeneralException with the specified detail message, list and nested Exception.
      Parameters:
      msg - the detail message.
      messages - error message list.
      nested - the nexted exception
    • GeneralException

      public GeneralException(List<String> messages, Throwable nested)
      Constructs an GeneralException with the specified detail message list and nested Exception.
      Parameters:
      messages - error message list.
      nested - the nested exception.
    • GeneralException

      public GeneralException(List<String> messages)
  • Method Details

    • checkException

      public static <T> T checkException(Throwable t) throws GeneralException
      Throws:
      GeneralException
    • getMessage

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

      public List<String> getMessageList()
      Gets message list.
      Returns:
      the message list
    • 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, null if there is not.
    • 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