(e: VmErr)
| 23 | } |
| 24 | |
| 25 | pub(super) fn stash_error(e: VmErr) { |
| 26 | let kind = err_to_kind(&e); |
| 27 | let msg = e.render(); |
| 28 | with_runtime(|rt| rt.error_stash.set_typed(kind, msg)); |
| 29 | } |
| 30 | |
| 31 | /* Inverse of `err_to_kind`: rebuilds a `VmErr` from (kind, msg). Exhaustive over `ErrorKind` so new variants can't slip into `Raised`. */ |
| 32 | pub(super) fn error_from_kind(kind: u32, msg: String) -> VmErr { |
no test coverage detected