1use std::io;
6
7use apk_info_axml::errors::{ARCSError, AXMLError};
8use apk_info_zip::{CertificateError, ZipError};
9use thiserror::Error;
10
11#[derive(Error, Debug)]
13pub enum APKError {
14 #[error(transparent)]
16 IoError(#[from] io::Error),
17
18 #[error("got invalid input: {0}")]
20 InvalidInput(&'static str),
21
22 #[error("got error while parsing AndroidManifest.xml: {0}")]
24 ManifestError(#[from] AXMLError),
25
26 #[error("got error while parsing resources.arsc: {0}")]
28 ResourceError(#[from] ARCSError),
29
30 #[error("got error while parsing manifest.json inside xapk: {0}")]
31 XAPKManifestError(#[from] serde_json::error::Error),
32
33 #[error("got error while parsing apk archive: {0}")]
35 ZipError(#[from] ZipError),
36
37 #[error("got error while parsing certificates: {0}")]
38 CertificateError(#[from] CertificateError),
39}