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
// # Errors // Defines a struct for errors and an enum which enumerates the error types // ## Prelude use table::{Index}; use runtime::Constraint; // ## The Error Struct #[derive(Clone, Debug, PartialEq, Serialize)] pub struct Error { pub block: u64, pub constraint: Constraint, pub error_id: ErrorType, } #[derive(Clone, Debug, PartialEq, Serialize)] pub enum ErrorType { MissingAttribute(Index), IndexOutOfBounds(((u64, u64), (u64, u64))), DuplicateAlias(u64), DomainMismatch(u64, u64), }