# Class PropertyException

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

All Implemented Interfaces:
  `Serializable`

public class PropertyException extends CayenneRuntimeException
An unchecked exception thrown on errors during property access, either within a Accessor or a Property.

Since:
  3.0
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Accessor`
  `accessor`
  `protected PropertyDescriptor`
  `property`
  `protected Object`
  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PropertyException(String messageFormat, Object... messageArgs)`
  `PropertyException(String messageFormat, Throwable cause, Object... messageArgs)`
  `PropertyException(String messageFormat, Accessor accessor, Object source, Object... messageArgs)`
  `PropertyException(String messageFormat, Accessor accessor, Object source, Throwable cause, Object... messageArgs)`
  `PropertyException(String messageFormat, PropertyDescriptor property, Object source, Object... messageArgs)`
  `PropertyException(String messageFormat, PropertyDescriptor property, Object source, Throwable cause, Object... messageArgs)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Accessor`
  `getAccessor()`
  Returns property descriptor that was used to access the property.
  `PropertyDescriptor`
  `getProperty()`
  `Object`
  `getSource()`
  Returns an object that caused an error.

  ### Methods inherited from class CayenneRuntimeException

  `getExceptionLabel, getMessage, getUnlabeledMessage`

  ### 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`

- ## Field Details

  - ### property

    protected PropertyDescriptor property

  - ### accessor

    protected Accessor accessor

  - ### source

    protected Object source

- ## Constructor Details

  - ### PropertyException

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

  - ### PropertyException

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

  - ### PropertyException

    public PropertyException(String messageFormat, Accessor accessor, Object source, Object... messageArgs)

  - ### PropertyException

    public PropertyException(String messageFormat, Accessor accessor, Object source, Throwable cause, Object... messageArgs)

  - ### PropertyException

    public PropertyException(String messageFormat, PropertyDescriptor property, Object source, Object... messageArgs)

  - ### PropertyException

    public PropertyException(String messageFormat, PropertyDescriptor property, Object source, Throwable cause, Object... messageArgs)

- ## Method Details

  - ### getAccessor

    public Accessor getAccessor()
    Returns property descriptor that was used to access the property. It may be null.

  - ### getProperty

    public PropertyDescriptor getProperty()

  - ### getSource

    public Object getSource()
    Returns an object that caused an error.