package org.theonefx.wcframework.ioc.exception;
/**
* Exception thrown when navigation of a valid nested property path encounters a NullPointerException.
*
* <p>
* For example, navigating "spouse.age" could fail because the spouse property of the target object has a null value.
*
* @author Rod Johnson
*/
public class NullValueInNestedPathException extends InvalidPropertyException {
private static final long serialVersionUID = 1L;
/**
* Create a new NullValueInNestedPathException.
*
* @param beanClass
* the offending bean class
* @param propertyName
* the offending property
*/
public NullValueInNestedPathException(Class<?> beanClass, String propertyName) {
super(beanClass, propertyName, "Value of nested property '" + propertyName + "' is null");
}
/**
* Create a new NullValueInNestedPathException.
*
* @param beanClass
* the offending bean class
* @param propertyName
* the offending property
* @param msg
* the detail message
*/
public NullValueInNestedPathException(Class<?> beanClass, String propertyName, String msg) {
super(beanClass, propertyName, msg);
}
}