NotReadablePropertyException class
The error a BeanWrapper throws when a property path cannot be read.
The path names a property the class does not have, goes through a class
that is not @Introspected, or uses an index outside a list.
// Person has no 'nickname' property.
try {
BeanWrapper(person).getPropertyValue('nickname');
} on NotReadablePropertyException catch (e) {
log.warning(e.propertyName); // nickname
}
Spring (Java):
try {
new BeanWrapperImpl(person).getPropertyValue("nickname");
} catch (NotReadablePropertyException e) {
log.warn(e.getPropertyName());
}
- Inheritance
-
- Object
- BeansException
- NotReadablePropertyException
Constructors
- NotReadablePropertyException(Type beanType, String propertyName, [String? reason])
-
The path
propertyNameof abeanTypecannot be read; the optional reason says why (default: "not readable").
Properties
- beanType → Type
-
The type of the wrapped (root) object.
final
- cause → Object?
-
The error that caused this one, if any: what a constructor threw, or
the container error of a nested bean.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
A human-readable description of the problem.
finalinherited
- mostSpecificCause → Object
-
rootCause, or this exception when it has no cause. Spring:
getMostSpecificCause().no setterinherited - propertyName → String
-
The full property path that failed.
final
- rootCause → Object?
-
The innermost cause: cause followed through nested container
errors, or
nullwithout a cause. Usually the error that really went wrong. Spring:getRootCause().no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited