{"record":{"id":"24565e1ed0304b73","repo":"wasmerio/wasmer","slug":"is-from-store-is-only-implemented-for-the-sys-back","errorCode":null,"errorMessage":"is_from_store is only implemented for the sys backend","messagePattern":"is_from_store is only implemented for the sys backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/api/src/entities/exception/inner.rs","lineNumber":46,"sourceCode":"                let BackendTag::Sys(tag) = &tag.0 else {\n                    panic!(\"cannot create Exception with Tag from another backend\");\n                };\n\n                Self::Sys(crate::backend::sys::exception::Exception::new(\n                    store, tag, payload,\n                ))\n            }\n            _ => unimplemented!(\"new is only implemented for the sys backend\"),\n        }\n    }\n\n    /// Checks whether this `Exception` can be used with the given store.\n    #[inline]\n    pub fn is_from_store(&self, store: &impl AsStoreRef) -> bool {\n        match self {\n            #[cfg(feature = \"sys\")]\n            Self::Sys(s) => s.is_from_store(store),\n            _ => unimplemented!(\"is_from_store is only implemented for the sys backend\"),\n        }\n    }\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\")]","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/api/src/entities/exception/inner.rs#L28-L64","documentation":"Exception::is_from_store checks whether the exception belongs to the given store, but the enum wrapper only dispatches for the sys backend; other backends panic with unimplemented!().","triggerScenarios":"Calling Exception::is_from_store(store) on an Exception whose variant is not Sys, i.e. on any non-sys backend build where an exception value exists.","commonSituations":"Validation code that checks store ownership before using exception values; code shared across backends where only sys supports exceptions.","solutions":["Only call exception APIs under the sys backend","Wrap the check in a backend feature check before invoking","Avoid storing/moving Exception values across backends","Extend the wrapper to implement is_from_store for other backends"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if !exceptions_supported(&store) { return Err(...); } // check backend == Sys first","typeGuard":"fn is_sys_exception(ex: &ExceptionInner) -> bool {\n    matches!(ex, ExceptionInner::Sys(_))\n}\n","tryCatchPattern":"let ok = std::panic::catch_unwind(|| exn.is_from_store(&store)).unwrap_or(false);","preventionTips":["Only construct/store Exception values on the sys backend","Wrap exception helpers in backend-checked functions","Track which backends your Exception values can originate from"],"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"}