All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jbock.util.AtFileReadError Maven / Gradle / Ivy

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