1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum Error {
7 #[error("{path}: {source}")]
8 Io {
9 path: PathBuf,
10 source: std::io::Error,
11 },
12 #[error("{path}:{line}: invalid .cube LUT: {msg}")]
13 CubeParse {
14 path: PathBuf,
15 line: usize,
16 msg: String,
17 },
18 #[error("invalid {what}: {value:?}")]
19 Invalid { what: &'static str, value: String },
20 #[error("{path}: {msg}")]
21 Import { path: PathBuf, msg: String },
22 #[error("invalid OTIO JSON: {0}")]
23 Json(#[from] serde_json::Error),
24 #[error("{0} is not implemented yet")]
26 Unimplemented(&'static str),
27 #[error("{0}")]
29 Pipeline(String),
30 #[error("{api}: {msg}")]
32 Gpu { api: &'static str, msg: String },
33 #[cfg(feature = "ffmpeg")]
34 #[error("ffmpeg: {0}")]
35 Ffmpeg(#[from] ffmpeg_next::Error),
36}
37
38pub type Result<T, E = Error> = std::result::Result<T, E>;