{"record":{"id":"c826ba6db61a85ee","repo":"wasmerio/wasmer","slug":"payload-is-only-implemented-for-the-sys-backend","errorCode":null,"errorMessage":"payload is only implemented for the sys backend","messagePattern":"payload is only implemented for the sys backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/api/src/entities/exception/inner.rs","lineNumber":66,"sourceCode":"    }\n\n    /// Gets the exception tag.\n    #[inline]\n    pub fn tag(&self, store: &impl AsStoreRef) -> Tag {\n        match self {\n            #[cfg(feature = \"sys\")]\n            Self::Sys(s) => Tag(BackendTag::Sys(s.tag(store))),\n            _ => unimplemented!(\"tag is only implemented for the sys backend\"),\n        }\n    }\n\n    /// Gets the exception payload values.\n    #[inline]\n    pub fn payload(&self, store: &mut impl AsStoreMut) -> Vec<Value> {\n        match self {\n            #[cfg(feature = \"sys\")]\n            Self::Sys(s) => s.payload(store),\n            _ => unimplemented!(\"payload is only implemented for the sys backend\"),\n        }\n    }\n\n    /// Get the `VMExceptionRef` corresponding to this `Exception`.\n    #[inline]\n    pub fn vm_exceptionref(&self) -> VMExceptionRef {\n        match self {\n            #[cfg(feature = \"sys\")]\n            Self::Sys(s) => VMExceptionRef::Sys(s.exnref()),\n            _ => unimplemented!(\"vm_exceptionref is only implemented for the sys backend\"),\n        }\n    }\n\n    /// Creates a new `Exception` from a `VMExceptionRef`.\n    #[inline]\n    pub fn from_vm_exceptionref(exnref: VMExceptionRef) -> Self {\n        match exnref {\n            #[cfg(feature = \"sys\")]","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/api/src/entities/exception/inner.rs#L48-L84","documentation":"Exception::payload returns the exception's payload values, but only the sys backend variant is implemented; all other backends panic with unimplemented!().","triggerScenarios":"Calling Exception::payload(store) on a non-Sys Exception variant, typically in a catch handler inspecting exception data on a non-sys backend.","commonSituations":"Host catch handlers extracting guest exception arguments; code ported from sys-backend-only builds.","solutions":["Use the sys backend for exception-handling workflows","Gate payload extraction behind a backend check","Encode exception data in linear memory rather than wasm exception payloads","Implement payload() for other backends"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if !matches!(exn.inner(), ExceptionInner::Sys(_)) { return Err(...); }","typeGuard":"fn sys_payload(ex: &Exception, store: &mut impl AsStoreMut) -> Option<Vec<Value>> {\n    if backend_is_sys(store) { Some(ex.payload(store)) } else { None }\n}\n","tryCatchPattern":"let payload = std::panic::catch_unwind(|| exn.payload(&mut store)).unwrap_or_default();","preventionTips":["Inspect payloads only in sys-backend handlers","Avoid exception payloads as a data channel if you target multiple backends","Test catch handlers against every configured backend"],"tags":["wasm","exception-handling","unimplemented","backend-support"],"backgroundTag":"feature-only-sys-backend","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}