net.jbock.util.AtFileReadError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbock Show documentation
Show all versions of jbock Show documentation
jbock annotations and utils
The newest version!
package net.jbock.util;
import net.jbock.model.CommandModel;
import java.nio.file.Path;
/**
* An instance of this class signals an IO error.
* This is an intermediate step in the construction of an
* {@link ErrAtFile} instance.
*/
final class AtFileReadError extends AtFileError {
private final Exception exception;
AtFileReadError(Exception exception, Path file) {
super(file);
this.exception = exception;
}
@Override
public ParsingFailed addModel(CommandModel model) {
return new ErrAtFile(model, file(), exception.getClass().getSimpleName()
+ ": " + exception.getMessage());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy