CayenneRuntimeException (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne, class: CayenneRuntimeException

# Class CayenneRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.cayenne.CayenneRuntimeException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ConfigurationException, DeleteDenyException, DomainStoppedException, ExpressionException, FaultFailureException, OptimisticLockException, PropertyException, UnresolvablePathException, ValidationException`

public class CayenneRuntimeException extends RuntimeException
A generic unchecked exception that may be thrown by Cayenne framework. All runtime exceptions in Cayenne inherit from this class.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CayenneRuntimeException()`
  Creates new CayenneRuntimeException without detail message.
  `CayenneRuntimeException(String messageFormat, Object... messageArgs)`
  Constructs an exception with the specified message and an optional list of message formatting arguments.
  `CayenneRuntimeException(String messageFormat, Throwable cause, Object... messageArgs)`
  Constructs an exception with the specified message and exception cause and an optional list of message formatting arguments.
  `CayenneRuntimeException(Throwable cause)`
  Constructs an `CayenneRuntimeException` that wraps `exception` thrown elsewhere.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getExceptionLabel()`
  `String`
  `getMessage()`
  Returns message that includes Cayenne version label and the actual exception message.
  `String`
  `getUnlabeledMessage()`
  Returns exception message without Cayenne version label.

  ### Methods inherited from class Throwable

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

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### CayenneRuntimeException

    public CayenneRuntimeException()
    Creates new CayenneRuntimeException without detail message.

  - ### CayenneRuntimeException

    public CayenneRuntimeException(String messageFormat, Object... messageArgs)
    Constructs an exception with the specified message and an optional list of message formatting arguments. Message formatting rules follow "String.format(..)" conventions.

  - ### CayenneRuntimeException

    public CayenneRuntimeException(Throwable cause)
    Constructs an `CayenneRuntimeException` that wraps `exception` thrown elsewhere.

  - ### CayenneRuntimeException

    public CayenneRuntimeException(String messageFormat, Throwable cause, Object... messageArgs)
    Constructs an exception with the specified message and exception cause and an optional list of message formatting arguments. Message formatting rules follow "String.format(..)" conventions.

- ## Method Details

  - ### getExceptionLabel

    public static String getExceptionLabel()
    Since:
      4.1

  - ### getUnlabeledMessage

    public String getUnlabeledMessage()
    Returns exception message without Cayenne version label.
    Since:
      1.1

  - ### getMessage

    public String getMessage()
    Returns message that includes Cayenne version label and the actual exception message.
    Overrides:
      `getMessage` in class `Throwable`