Skip to content

wasmtime.Trap is difficult to inspect #63

@srenatus

Description

@srenatus

Currently, unless I'm mistaken, we'll have to check the wasmtime.Trap's Message() to figure out what happened.

While there could be user-defined traps, there seem to be a bunch of pre-defined ones in wasmtime:
https://github.com/bytecodealliance/wasmtime/blob/bde955579336e124b2c01b3164314bf2d6eec378/cranelift/codegen/src/ir/trapcode.rs#L8-L54

It would be nice if these were exposed to Go, allowing for use with errors.Is() or errors.As(), instead of inspecting the message string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions