fugue_ir/disassembly/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5    #[error("specification deserialisation error: {0}")]
6    Specification(crate::deserialise::Error),
7    #[error("address `{:#x}` misaligned; expected alignment is {}", address, alignment)]
8    IncorrectAlignment {
9        address: u64,
10        alignment: usize,
11    },
12    #[error("context commit")]
13    ContextCommit,
14    #[error("input could not be resolved to known instruction")]
15    InstructionResolution,
16    #[error("next address undefined")]
17    InvalidNextAddress,
18    #[error("address after next address undefined")]
19    InvalidNext2Address,
20    #[error("constructor invalid")]
21    InvalidConstructor,
22    #[error("pattern invalid")]
23    InvalidPattern,
24    #[error("symbol invalid")]
25    InvalidSymbol,
26    #[error("space invalid")]
27    InvalidSpace,
28    #[error("handle invalid")]
29    InvalidHandle,
30    #[error("offset invalid")]
31    InvalidOffset,
32    #[error("inconsistent disassembly state")]
33    InconsistentState,
34    #[error("{0}")]
35    Invariant(String),
36    #[error("nested delay slot")]
37    NestedDelaySlot,
38}