Jinntec / Fore

Fore - declarative user interfaces in plain HTML
MIT License
82 stars 11 forks source link

Unparseable expression handling #188

Closed nverwer closed 1 year ago

nverwer commented 1 year ago

This PR shows a console error for an unparseable expression. The error includes the expression.

DrRataplan commented 1 year ago

Hey Nico,

Cool! This I ran into a couple of times myself as well. I'd add the actual error as well, just to make sure users have the best time fixing what's up. So console.error(`Ignoring errored expr: ${expr}`, error); or something.

nverwer commented 1 year ago

Hello Martin,

Including the error is a good idea, although I seem to remember that it did not add much useful information. But one day it may, and it is not nice to throw the error away.

I could change the PR, but maybe you could just add the try-catch and close this PR?

JoernT commented 1 year ago

the change has been incorporated and refined by Martin