use SubtitleFormat;
pub use formats::idx::errors as idx_errors;
pub use formats::microdvd::errors as mdvd_errors;
pub use formats::srt::errors as srt_errors;
pub use formats::ssa::errors as ssa_errors;
pub use formats::vobsub::errors as vob_errors;
#[cfg_attr(rustfmt, rustfmt_skip)]
error_chain! {
foreign_links {
FromUtf8Error(::std::string::FromUtf8Error)
;
}
links {
SsaError(ssa_errors::Error, ssa_errors::ErrorKind)
;
IdxError(idx_errors::Error, idx_errors::ErrorKind)
;
SrtError(srt_errors::Error, srt_errors::ErrorKind)
;
VobError(vob_errors::Error, vob_errors::ErrorKind)
;
MdvdError(mdvd_errors::Error, mdvd_errors::ErrorKind)
;
}
errors {
UnknownFileFormat {
description("unknown file format, only SubRip (.srt), SubStationAlpha (.ssa/.ass) and VobSub (.idx and .sub) are supported at the moment")
}
DecodingError {
description("error while decoding subtitle from bytes to string (wrong charset encoding?)")
}
TextFormatOnly {
description("operation does not work on binary subtitle formats (only text formats)")
}
UpdatingEntriesNotSupported(format: SubtitleFormat) {
description("updating subtitles is not implemented or supported by the `subparse` library for this format")
display("updating subtitles is not implemented or supported by the `subparse` library for this format: {}", format.get_name())
}
}
}