isr_dl_linux/ubuntu/error.rs
1/// Errors surfaced while fetching and parsing Ubuntu debug symbol packages.
2#[derive(thiserror::Error, Debug)]
3pub enum UbuntuError {
4 /// I/O error while reading or writing a cached file.
5 #[error(transparent)]
6 Io(#[from] std::io::Error),
7
8 /// HTTP error while talking to an Ubuntu mirror.
9 #[error(transparent)]
10 Http(#[from] reqwest::Error),
11
12 /// Failed to parse a URL from the package index.
13 #[error(transparent)]
14 Url(#[from] url::ParseError),
15
16 /// Failed to parse a Debian `.deb` archive.
17 #[error(transparent)]
18 DebPackage(#[from] debpkg::Error),
19
20 /// The expected file was not present inside the `.deb` archive.
21 #[error("deb entry not found")]
22 DebEntryNotFound,
23
24 /// The package URL has no filename component.
25 #[error("URL does not contain filename")]
26 UrlMissingFilename,
27
28 /// The `Packages` index file contained non-UTF-8 bytes.
29 #[error("invalid UTF-8 in Packages index")]
30 PackagesIndexNonUtf8,
31
32 /// A package entry in the `Packages` index did not include a `Filename:`
33 /// field.
34 #[error("missing `Filename` field in package entry")]
35 PackageMissingFilename,
36
37 /// More than one package matched the version signature.
38 #[error("multiple matching packages")]
39 PackageMultipleCandidates,
40
41 /// No package in the index matched the version signature.
42 #[error("package not found")]
43 PackageNotFound,
44}