MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / stash_error

Function stash_error

wasm-pdk/src/lib.rs:83–87  ·  view source on GitHub ↗

Invoked by `#[plugin_fn]` expansion when a user fn returns `Err(_)`.

(e: Error)

Source from the content-addressed store, hash-verified

81
82 /// Invoked by `#[plugin_fn]` expansion when a user fn returns `Err(_)`.
83 pub fn stash_error(e: Error) {
84 let kind = e.kind();
85 let msg = e.message().to_string();
86 unsafe { super::edge_throw(kind, msg.as_ptr(), msg.len() as u32); }
87 }
88
89 /// Host-side argv stager; allocations leak until the WASM instance is dropped.
90 #[unsafe(no_mangle)]

Callers 1

r#matchFunction · 0.50

Calls 3

kindMethod · 0.80
messageMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected