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

Error handling when returning undefined #12

Open
met4000 opened this issue Jun 10, 2024 · 1 comment
Open

Error handling when returning undefined #12

met4000 opened this issue Jun 10, 2024 · 1 comment

Comments

@met4000
Copy link

met4000 commented Jun 10, 2024

Issue type:

  • ➕ Feature request

Short description:

Functions that return undefined (e.g. function f() { return undefined; }, or function f() {} ) give a rather verbose error as follows when apply0ed;
image

It would be desireable to either have: a dedicated error for a function returning undefined, rather than a translation error occuring (e.g. 'error: function returned undefined instead of a value'); or for an explicit 'undefined' singleton to be the output instead of erroring, allowing for logic such as equals(f(), undefined) on the InDy side.

@rubensworks
Copy link
Member

Thanks for the suggestion!

@rubensworks rubensworks moved this to Options in Features Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Options
Development

No branches or pull requests

2 participants