pub fn maybe_exit_on_error(e: Error) -> Error
Available on crate feature
exit
only.Expand description
Exit the process with a conventional OS error code as long as Wasmtime
understands the error. If the error is not an I32Exit
or Trap
, return
the error back to the caller for it to decide what to do.
Note: this function is designed for usage where it is acceptable for Wasmtime failures to terminate the parent process, such as in the Wasmtime CLI; this would not be suitable for use in multi-tenant embeddings.