-
Notifications
You must be signed in to change notification settings - Fork 386
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
feat: add os.Exit #686
feat: add os.Exit #686
Conversation
Happy Easter ! :)
Can you describe 1) the problem to solve and 2) the trade-off made with this solution? We should put extra cautious in creating the native method in stdlibs to alter the state or intercept the execution of the machine. |
In case you need to exit in a smart contract |
Sure, in what cases do we need to exit a smart contract that can not be handled at the end of the function call in a package managed by GVM runtime? Calling os.exit() directly from a contract breaks the contract call flow and GVM persistent flow. |
|
IMHO, Inside a VM, it seems like a good idea to define an operation like |
I also tend to agree that it is not a good idea to add I prefer much more a defer-recover in the functions of the contract that need to be able to exit with a specific error than can be used to exit it. |
guys... this was an April fool ... i guess it's failed 😂 |
lol |
Description
Allow to exit a realm