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

Fail early and reliably #22

Closed
cshaa opened this issue Mar 1, 2020 · 2 comments
Closed

Fail early and reliably #22

cshaa opened this issue Mar 1, 2020 · 2 comments
Labels
design An issue regarding the user experience enhancement New feature or request implemented This feature is implemented in `develop` and ready for testing
Milestone

Comments

@cshaa
Copy link
Owner

cshaa commented Mar 1, 2020

Right now, unknown symbols return undefined, rather than returning a descriptive error:

compileExpression('a', {b: 4})
// undefined
compileExpression('foo of bar')({ bar: 4 })
// undefined

This way, expressions are prone to bugs:

compileExpression('widht > 500', {width: 600})
// false (0)

There should be an API for errors. Errors should be machine-readable and easily localisable by the developer. Errors should be thrown returned much more often.

@cshaa cshaa added this to the v3 milestone Mar 1, 2020
@cshaa cshaa added the enhancement New feature or request label Mar 1, 2020
@cshaa cshaa added the design An issue regarding the user experience label Jun 16, 2021
@cshaa cshaa added the implemented This feature is implemented in `develop` and ready for testing label Jun 17, 2021
@cshaa cshaa closed this as completed Jun 17, 2021
@cshaa cshaa mentioned this issue Sep 17, 2021
15 tasks
@lublak
Copy link

lublak commented Apr 25, 2022

@m93a but it would be better to make it optional, since I, for example, work with this undefined.

@cshaa
Copy link
Owner Author

cshaa commented Jun 13, 2022

“Every change breaks someone's workflow.”

XKCD Comic. Changes in version 10.17: The CPU no longer overheats when you hold down spacebar. Comments: LongitmeUser4 writes: This update broke my workflow! My control key is hard to reach, so I hold spacebar instead, and I configured Emacs to interpret a rapid temperature rise as "control". Admin writes: That's horrifying. LongtimeUser4 writes: Look, my setup works for me. Just add an option to reenable spacebar heating.

That said, there is an easy walkaround :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design An issue regarding the user experience enhancement New feature or request implemented This feature is implemented in `develop` and ready for testing
Projects
None yet
Development

No branches or pull requests

2 participants