Add snafu for errors

This commit is contained in:
Berkus Decker 2020-11-22 16:26:42 +02:00
parent ffde65fb81
commit 4c9703340e
1 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,7 @@ use {
core::{convert::TryFrom, fmt},
paste::paste,
register::{register_bitfields, LocalRegisterCopy},
snafu::Snafu,
};
//==================
@ -365,6 +366,7 @@ impl CapNodeCapability {
#[derive(Clone)]
pub struct DerivationTreeNode(LocalRegisterCopy<u128, CapDerivationNode::Register>);
#[derive(Debug, Snafu)]
pub enum DerivationTreeError {
InvalidPrev,
}
@ -437,7 +439,7 @@ impl CapTableEntry {
}
}
#[derive(Debug)]
#[derive(Debug, Snafu)]
pub enum CapError {
CannotCreate,
InvalidCapabilityType,