hao_il2cpp_runtime/
error.rs1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, Error>;
4
5#[derive(Error, Debug)]
6pub enum Error {
7 #[error("could not load the game binary: {0}")]
8 Load(libloading::Error),
9 #[error("the game binary does not export {0}: {1}")]
10 MissingExport(&'static str, libloading::Error),
11 #[error("{0}")]
12 UnsupportedBinary(String),
13 #[error("signature mismatch, {0}")]
14 Signature(String),
15 #[error("il2cpp_init failed")]
16 Init,
17 #[error("could not find {0}")]
18 NotFound(String),
19 #[error("{0} contains a nul byte")]
20 Nul(String),
21 #[error("hooking failed: {0:?}")]
22 Hook(hooking::error::HookingError),
23 #[error("{0}")]
24 Exception(String),
25}