scripting/runtime/host_condition.rs
1use thiserror::Error;
2
3use super::EvalValue;
4
5/// A structured failure a native returns as its host `Err`. The classifier
6/// lifts it from the wasmtime error chain with code and detail intact.
7#[derive(Debug, Clone, PartialEq, Error)]
8#[error("{message}")]
9pub struct HostCondition {
10 pub code: String,
11 pub message: String,
12 pub detail: Option<EvalValue>,
13}