cz.jalasoft.util.configuration.exception.PropertyNotFoundException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JalasoftUtils Show documentation
Show all versions of JalasoftUtils Show documentation
A collection of utility classes that might be useful.
The newest version!
package cz.jalasoft.util.configuration.exception;
import static cz.jalasoft.util.ArgumentAssertion.*;
/**
* A runtime exception that identifies a situation when there
* is no value for a given key in a configuration file.
*
* @author Honza Lastovicka
*/
public final class PropertyNotFoundException extends RuntimeException {
private final String key;
public PropertyNotFoundException(String key) {
mustNotBeNullOrEmpty(key, "Property key must not be null or empty");
this.key = key;
}
@Override
public String getMessage() {
return "No property found for key " + key;
}
}