{"record":{"id":"4a44b0222a9b142f","repo":"wasmerio/wasmer","slug":"tag-is-only-implemented-for-the-sys-backend","errorCode":null,"errorMessage":"tag is only implemented for the sys backend","messagePattern":"tag is only implemented for the sys backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/api/src/entities/exception/inner.rs","lineNumber":56,"sourceCode":"    }\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\")]\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\")]","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/api/src/entities/exception/inner.rs#L38-L74","documentation":"Exception::tag returns the exception's tag, dispatching only to the sys backend variant; any other backend variant panics with unimplemented!().","triggerScenarios":"Calling Exception::tag(store) when the Exception holds a non-Sys backend variant, e.g. on the v8 backend with the exception-handling feature exposed.","commonSituations":"Exception handlers matching on tags to classify guest errors; cross-backend test harnesses.","solutions":["Restrict exception handling to the sys backend","Check backend support before reading the tag; treat non-sys exceptions as unsupported","Use a common error channel (memory + i32 codes) instead of wasm exceptions","Implement tag() for the remaining backends"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if !matches!(exn.inner(), ExceptionInner::Sys(_)) { return Err(...); }","typeGuard":"fn sys_tag(ex: &Exception, store: &impl AsStoreRef) -> Option<Tag> {\n    match ex {\n        Exception::Sys(_) if backend_is_sys(store) => Some(ex.tag(store)),\n        _ => None,\n    }\n}\n","tryCatchPattern":"let tag = std::panic::catch_unwind(|| exn.tag(&store)).ok();","preventionTips":["Match on exception variants before accessing tag/payload","Keep exception classification code sys-only","Add compile-time assertions when only the sys feature is enabled"],"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"}