{"record":{"id":"bb6064143a5339cb","repo":"wasmerio/wasmer","slug":"cannot-create-exception-with-tag-from-another-stor","errorCode":null,"errorMessage":"cannot create Exception with Tag from another Store","messagePattern":"cannot create Exception with Tag from another Store","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/api/src/backend/sys/entities/exception.rs","lineNumber":24,"sourceCode":"\nuse crate::{\n    AsStoreMut, AsStoreRef, BackendTag, Tag, Value,\n    sys::vm::{VMExceptionObj, VMExceptionRef},\n};\n\n#[derive(Debug, Clone, PartialEq, Eq)]\n/// A WebAssembly `exnref` in the `sys` runtime.\npub(crate) struct Exception {\n    exnref: wasmer_vm::VMExceptionRef,\n}\n\nimpl Exception {\n    /// Creates a new exception with the given tag and payload, and also creates\n    /// a reference to it, returning the reference.\n    #[allow(irrefutable_let_patterns)]\n    pub fn new(store: &mut impl AsStoreMut, tag: &crate::sys::tag::Tag, payload: &[Value]) -> Self {\n        if !tag.is_from_store(store) {\n            panic!(\"cannot create Exception with Tag from another Store\");\n        }\n\n        let store_objects = store.as_store_ref().objects().as_sys();\n        let store_id = store_objects.id();\n\n        let tag_ty = tag.handle.get(store_objects).signature.params();\n\n        if tag_ty.len() != payload.len() {\n            panic!(\"payload length mismatch\");\n        }\n\n        let values = payload\n            .iter()\n            .enumerate()\n            .map(|(i, v)| {\n                if v.ty() != tag_ty[i] {\n                    panic!(\"payload type mismatch\");\n                }","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/api/src/backend/sys/entities/exception.rs#L6-L42","documentation":"Error \"cannot create Exception with Tag from another Store\" thrown in wasmerio/wasmer.","triggerScenarios":"Thrown at lib/api/src/backend/sys/entities/exception.rs:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}