-
Notifications
You must be signed in to change notification settings - Fork 283
Expand file tree
/
Copy patherror.rs
More file actions
37 lines (29 loc) · 1.04 KB
/
error.rs
File metadata and controls
37 lines (29 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use thiserror::Error;
/// A marker type for workflow registration errors
#[derive(Debug, Error)]
#[error("Failed to register workflow activity")]
pub struct WorkflowRegistrationError;
impl From<()> for WorkflowRegistrationError {
fn from(_: ()) -> Self {
WorkflowRegistrationError
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ILLevel {
Low,
Medium,
High,
}
#[derive(Error, Debug)]
pub enum Error {
#[error("Unable to retrieve {level:?} IL for function at {func_start:#x}")]
MissingIL { level: ILLevel, func_start: u64 },
#[error("Unable to retrieve {level:?} SSA IL for function at {func_start:#x}")]
MissingSsaForm { level: ILLevel, func_start: u64 },
#[error("Unexpected LLIL operation at address {address:#x} (expected {expected})")]
UnexpectedLlilOperation { address: u64, expected: String },
#[error("Invalid selector at address {address:#x}")]
InvalidSelector { address: u64 },
#[error(transparent)]
WorkflowRegistrationFailed(#[from] WorkflowRegistrationError),
}