feat(arr): add Error::Decode for bad subtitle bytes

This commit is contained in:
Miguel Palhas
2026-08-24 22:41:17 +01:00
parent 94d9fc8b89
commit 5d7d881ab9
+13
View File
@@ -74,6 +74,19 @@ pub enum Error {
#[source]
source: std::io::Error,
},
/// A downloaded subtitle's bytes did not decode under any plausible
/// encoding.
///
/// Writing mojibake into the library is worse than a failed attempt
/// (#186 already records a failure reason).
#[error("{candidate} did not decode to UTF-8: {detail}")]
Decode {
/// The candidate whose bytes failed to decode.
candidate: CandidateId,
/// What was wrong, short enough to log.
detail: String,
},
}
impl Error {