io.polyapi.plugin.error.validation.InexistentFileException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polyapi-maven-plugin Show documentation
Show all versions of polyapi-maven-plugin Show documentation
Maven plugin to run handle Poly API functions.
package io.polyapi.plugin.error.validation;
import java.io.File;
import java.util.Optional;
/**
* {@link ValidationException} thrown when a file in a determined path doesn't exist.
*/
public class InexistentFileException extends ValidationException {
private final File file;
public InexistentFileException(String propertyName, File file) {
super(propertyName, "File property '%s' with value '" + Optional.ofNullable(file).map(File::getAbsolutePath).orElse("null") + "' does not exist.");
this.file = file;
}
public File getFile() {
return file;
}
}