-
Notifications
You must be signed in to change notification settings - Fork 408
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
Add new built-in: error(msg) #1118
Conversation
Error will fail execution with the message given error: Call to function `error` failed: something is wrong, yo! | 24 | x := error("something is wrong, yo!") When provided no message, it however behaves: error: Call to function `error` failed: | 24 | x := error("")
Feel free to wordsmith the readme text as desired. I consider it a rough draft at best. |
As a second comment, thinking about this, it is annoying that you have to do x := error("foo") and not just error("foo"). I'm assuming that's a general grammar issue, and not something I should fix here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good! A couple of comments. There should also be a new entry for the function in the functions section of the readme.
Co-authored-by: Casey Rodarmor <casey@rodarmor.com>
I'll update the readme tonight. |
Sorry for losing track of this! I don't have notifications turned on when someone pushes to a PR branch, so you have to ping me. This looks good, merging! Definitely a nice function to have. |
Fixes: #1073
Error will fail execution with the message given
When provided no message, it however behaves: