Skip to content

Fail early and reliably #22

@cshaa

Description

@cshaa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designAn issue regarding the user experienceenhancementNew feature or requestimplementedThis feature is implemented in `develop` and ready for testing

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions