use subparse;
#[cfg_attr(rustfmt, rustfmt_skip)]
error_chain! {
foreign_links {
Io(::std::io::Error);
}
links {
SubparseError(subparse::errors::Error, subparse::errors::ErrorKind);
}
errors {
FileOperation(file: String) {
display("operation on file '{}' failed", file)
}
UnknownEncoding(enc: String) {
display("unknown file encoding '{}'", enc)
}
SsaFormattingInfoNotFound {
description("file did not have a `[Events]` section containing a line beginning with `Format: `")
}
ArgumentParseError(argument_name: &'static str, s: String) {
display("command line argument '{}' could not be parsed from string '{}'", argument_name, s)
}
InvalidArgument(argument_name: &'static str) {
display("command line argument '{}' has invalid value", argument_name)
}
ExpectedPositiveNumber(i: i64) {
display("expected positive number, got '{}'", i)
}
ValueNotInRange(v: f64, min: f64, max: f64) {
display("expected value in the range from '{}' to '{}', found value '{}'", min, max, v)
}
DifferentOutputFormat(input_file: String, output_file: String) {
description("the requested output file has a different format than the incorrect subtitle file (this program does not convert)")
display("the requested output '{}' file has a different format than the incorrect subtitle file '{}' (this program does not convert)", output_file, input_file)
}
}
}