spring-framework / org.springframework.beans / PropertyAccessException

PropertyAccessException

abstract class PropertyAccessException : BeansException

Superclass for exceptions related to a property access, such as type mismatch or invocation target exception.

Author
Rod Johnson

Author
Juergen Hoeller

Constructors

<init>

PropertyAccessException(propertyChangeEvent: PropertyChangeEvent, msg: String, cause: Throwable)

Create a new PropertyAccessException.

PropertyAccessException(msg: String, cause: Throwable)

Create a new PropertyAccessException without PropertyChangeEvent.

Functions

getErrorCode

abstract fun getErrorCode(): String

Return a corresponding error code for this type of exception.

getPropertyChangeEvent

open fun getPropertyChangeEvent(): PropertyChangeEvent

Return the PropertyChangeEvent that resulted in the problem.

May be null; only available if an actual bean property was affected.

getPropertyName

open fun getPropertyName(): String

Return the name of the affected property, if available.

getValue

open fun getValue(): Any

Return the affected value that was about to be set, if any.

Inheritors

MethodInvocationException

open class MethodInvocationException : PropertyAccessException

Thrown when a bean property getter or setter method throws an exception, analogous to an InvocationTargetException.

TypeMismatchException

open class TypeMismatchException : PropertyAccessException

Exception thrown on a type mismatch when trying to set a bean property.