Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add wasmtime trap information on function call errors, if available #620

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

tessi
Copy link
Owner

@tessi tessi commented Aug 13, 2024

Function call errors into web assembly now have more detail if wasmtimes trap information is available. This helps, for example, when using fuel and the wasmtime store is out of fuel:

Error during function excecution (wasm trap: all fuel consumed by WebAssembly): error while executing at wasm backtrace:
    0: 0x3618 - wasmex_test.wasm!void

The new information is added in parenthesis just after the Error during function excecution message.

See: #617

@tessi tessi mentioned this pull request Aug 13, 2024
@superchris
Copy link
Collaborator

This seems really nice! I might like to do something very similar in the components code, turning traps (eg when wasi is needed but not present) into proper error tuples would be lovely

@tessi
Copy link
Owner Author

tessi commented Dec 1, 2024

thanks @superchris now that at least one person thinks this is helpful, let's merge :)

@tessi tessi merged commit a8a3bc5 into main Dec 1, 2024
13 checks passed
@tessi tessi deleted the better_errors branch December 1, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants