Skip to content

Commit e1dac23

Browse files
committed
feat: add generic expect wasm error
1 parent 4147569 commit e1dac23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clarity/src/vm/errors.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ pub enum WasmError {
145145
ExpectedReturnValue,
146146
InvalidIndicator(i32),
147147
Runtime(wasmtime::Error),
148+
Expect(String),
148149
}
149150

150151
#[cfg(feature = "clarity-wasm")]
@@ -184,6 +185,7 @@ impl fmt::Display for WasmError {
184185
write!(f, "Invalid response/optional indicator: {indicator}")
185186
}
186187
WasmError::Runtime(e) => write!(f, "Runtime error: {e}"),
188+
WasmError::Expect(s) => write!(f, "{s}"),
187189
}
188190
}
189191
}

0 commit comments

Comments
 (0)