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

User overridable panic builtin #250

Open
giann opened this issue Jan 16, 2024 · 0 comments
Open

User overridable panic builtin #250

giann opened this issue Jan 16, 2024 · 0 comments
Labels
language Issue related to the language vm Issue related to the VM
Milestone

Comments

@giann
Copy link
Collaborator

giann commented Jan 16, 2024

  • Callback called when unrecoverable error is raised (e.g. index out of bound, out of memory)
fun panic(str error, [str]? stack = null) > void;
  • New std method to set a user defined panic function
import "std";

|...

setPanic(
    fun (str error, [str]? stack = null)
        -> print("Unrecoverable error {error} at: {stack}"
    )
);
@giann giann added language Issue related to the language vm Issue related to the VM labels Jan 16, 2024
@giann giann added this to the 0.4.0 milestone Jan 16, 2024
@giann giann modified the milestones: 0.4.0, 0.5.0 May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Issue related to the language vm Issue related to the VM
Projects
None yet
Development

No branches or pull requests

1 participant