org.apache.cayenne

## Class CayenneException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.apache.cayenne.CayenneException

- All Implemented Interfaces:
    Serializable

      public class CayenneException
      extends Exception

  A generic checked exception that may be thrown by Cayenne framework. All checked exceptions in Cayenne inherit from this class.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CayenneException()` Creates new `CayenneException` without detail message.
    `CayenneException(String messageFormat, Object... messageArgs)` Constructs an `CayenneException` with the specified detail message.
    `CayenneException(String messageFormat, Throwable cause, Object... messageArgs)`
    `CayenneException(Throwable cause)` Constructs an `CayenneException` that wraps a `cause` thrown elsewhere.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getExceptionLabel()`
    `String` | `getMessage()`
    `String` | `getUnlabeledMessage()` Returns exception message without Cayenne version label.

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

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

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

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

- - ### Constructor Detail

    - #### CayenneException

          public CayenneException()

      Creates new `CayenneException` without detail message.

    - #### CayenneException

          public CayenneException(String messageFormat,
                                  Object... messageArgs)

      Constructs an `CayenneException` with the specified detail message.
      Parameters:
        `messageFormat` - the detail message format string.

    - #### CayenneException

          public CayenneException(Throwable cause)

      Constructs an `CayenneException` that wraps a `cause` thrown elsewhere.

    - #### CayenneException

          public CayenneException(String messageFormat,
                                  Throwable cause,
                                  Object... messageArgs)

  - ### Method Detail

    - #### getExceptionLabel

          public static String getExceptionLabel()

    - #### getUnlabeledMessage

          public String getUnlabeledMessage()

      Returns exception message without Cayenne version label.
      Since:
        1.1

    - #### getMessage

          public String getMessage()

      Overrides:
        `getMessage` in class `Throwable`

Copyright © 2001–2023 Apache Cayenne. All rights reserved.