rv32_asm/
error.rs

1use thiserror;
2
3#[derive(PartialEq, Debug, Clone, thiserror::Error)]
4pub enum Error {
5    #[error("A label {0} is not defined.")]
6    LabelNotDefined(String),
7
8    #[error("Undefined variable: `{0}` at {1}")]
9    UndefinedVariable(String, &'static str),
10
11    #[error("Bug: {message:?} at {file:?}:{line:?}")]
12    Bug {
13        message: String,
14        file: &'static str,
15        line: u32,
16    },
17
18    // For non-local exists
19    #[error("")]
20    DoNothing,
21}