buzz icon indicating copy to clipboard operation
buzz copied to clipboard

User overridable panic builtin

Open giann opened this issue 1 year ago • 0 comments

  • 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 avatar Jan 16 '24 14:01 giann