-
Notifications
You must be signed in to change notification settings - Fork 373
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
Panic in native functions #663
Comments
I think we should actually make this slightly different. There could be reasons why the code panics inside of native code for reasons also outside of our control - so I think that when calling native functions, gnovm should guard this with a |
So you think there will be cases where a panic doesn't necessarily trigger a How would you identify such cases ? With a specific err/struct passed in the |
Fix gnolang#663 Some panic invoked in native functions should be recoverable from gno code. To do that, `panic` is replaced with `machine.Panic()` which checks first beyond the call stack if there's a recover, before panic-ing.
Fix gnolang#663 Some panic invoked in native functions should be recoverable from gno code. To do that, `panic` is replaced with `machine.Panic()` which checks first beyond the call stack if there's a recover, before panic-ing.
Fix gnolang#663 Some panic invoked in native functions should be recoverable from gno code. To do that, `panic` is replaced with `machine.Panic()` which checks first the call stack if there's a recover, before panic-ing.
Fix #663 Some panic invoked in native functions should be recoverable from gno code. To do that, `panic` is replaced with `machine.Panic()` which checks first the call stack if there's a recover, before panic-ing.
Fix #663 Some panic invoked in native functions should be recoverable from gno code. To do that, `panic` is replaced with `machine.Panic()` which checks first the call stack if there's a recover, before panic-ing.
Currently, the panics that are invoked in native functions uses the built-in
panic()
, and this is not possible to recover from them in gno code. I think this is wrong and the panic invoked in native functions should be recoverable.This can be fixed by calling
machine.Panic
instead of the built-inpanic
. I vote for this change, wdyt ?The text was updated successfully, but these errors were encountered: