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

Review exception handling #459

Merged
merged 5 commits into from
Aug 13, 2024
Merged

Conversation

andreaTP
Copy link
Collaborator

@andreaTP andreaTP commented Aug 12, 2024

This is a more transparent approach to error handling that doesn't wrap underlying exceptions.

Fix #455

Copy link
Collaborator

@electrum electrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can delete WASMMachineException now. It appears to be unused after this change.

throw new WASMMachineException(machine.getStackTrace(), e);
}
};
return (args) -> machine.call(export.index(), args);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: no need for parens around singular lambda argument

@@ -59,7 +59,11 @@ public static Value[] call(
stackFrame.pushCtrl(OpCode.CALL, 0, type.returns().size(), stack.size());
callStack.push(stackFrame);

eval(stack, instance, callStack);
try {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, doing this here is cleaner

@andreaTP
Copy link
Collaborator Author

Removed WASMMachineException, good catch!

@andreaTP andreaTP merged commit bef1801 into dylibso:main Aug 13, 2024
13 checks passed
@andreaTP andreaTP mentioned this pull request Sep 2, 2024
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.

WasiExitException should not be wrapped by WASMMachineException
3 participants