Start new Error structure in state_processing

This commit is contained in:
Paul Hauner
2019-03-06 10:22:19 +11:00
parent 0be8e57fd3
commit a15ed0acd3
5 changed files with 290 additions and 121 deletions

View File

@@ -0,0 +1,8 @@
#[macro_use]
macro_rules! ensure {
($condition: expr, $result: ident) => {
if !$condition {
return Err(Error::Invalid(Invalid::$result));
}
};
}