diff options
Diffstat (limited to 'tvix/serde/src/error.rs')
-rw-r--r-- | tvix/serde/src/error.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tvix/serde/src/error.rs b/tvix/serde/src/error.rs index fb83105cd210..f206b830e95f 100644 --- a/tvix/serde/src/error.rs +++ b/tvix/serde/src/error.rs @@ -31,6 +31,12 @@ pub enum Error { errors: Vec<tvix_eval::Error>, source: tvix_eval::SourceCode, }, + + /// Could not determine an externally tagged enum representation. + AmbiguousEnum, + + /// Attempted to provide content to a unit enum. + UnitEnumContent, } impl Display for Error { @@ -69,6 +75,10 @@ impl Display for Error { Error::IntegerConversion { got, need } => { write!(f, "i64({}) does not fit in a {}", got, need) } + + Error::AmbiguousEnum => write!(f, "could not determine enum variant: ambiguous keys"), + + Error::UnitEnumContent => write!(f, "provided content for unit enum variant"), } } } |