wasmerio/wasmer · error

cannot create Exception with Tag from another Store

Error message

cannot create Exception with Tag from another Store

What it means

Error "cannot create Exception with Tag from another Store" thrown in wasmerio/wasmer.

Source

Thrown at lib/api/src/backend/sys/entities/exception.rs:24

use crate::{
    AsStoreMut, AsStoreRef, BackendTag, Tag, Value,
    sys::vm::{VMExceptionObj, VMExceptionRef},
};

#[derive(Debug, Clone, PartialEq, Eq)]
/// A WebAssembly `exnref` in the `sys` runtime.
pub(crate) struct Exception {
    exnref: wasmer_vm::VMExceptionRef,
}

impl Exception {
    /// Creates a new exception with the given tag and payload, and also creates
    /// a reference to it, returning the reference.
    #[allow(irrefutable_let_patterns)]
    pub fn new(store: &mut impl AsStoreMut, tag: &crate::sys::tag::Tag, payload: &[Value]) -> Self {
        if !tag.is_from_store(store) {
            panic!("cannot create Exception with Tag from another Store");
        }

        let store_objects = store.as_store_ref().objects().as_sys();
        let store_id = store_objects.id();

        let tag_ty = tag.handle.get(store_objects).signature.params();

        if tag_ty.len() != payload.len() {
            panic!("payload length mismatch");
        }

        let values = payload
            .iter()
            .enumerate()
            .map(|(i, v)| {
                if v.ty() != tag_ty[i] {
                    panic!("payload type mismatch");
                }

View on GitHub (pinned to 8c4b9ee9d3)

When it happens

Trigger: Thrown at lib/api/src/backend/sys/entities/exception.rs:24 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01). Data as JSON: /api/errors/bb6064143a5339cb. Report an issue: GitHub.