yaml / yamlscript

Programming in YAML
MIT License
408 stars 33 forks source link

Improve error messages #48

Open ingydotnet opened 10 months ago

ingydotnet commented 10 months ago

From the ys CLI we get:

$ ys -e 'say: 2+2'
Error: java.lang.Exception: Invalid symbol: '+2'{:eval ["say: 2+2"], :debug-stage {}}

would be better as:

$ ys -e 'say: 2+2'
Error: Invalid symbol: '+2'

And in Perl binding:

$ LD_LIBRARY_PATH=~/lib PERL5LIB=perl/lib perl -MXXX -MYAMLScript -e 'XXX + YAMLScript->new->load("!yamlscript/v0\nsay: 2+2")'
libyamlscript: Invalid symbol: '+2' at perl/lib/YAMLScript.pm line 81.

would be better as:

$ LD_LIBRARY_PATH=~/lib PERL5LIB=perl/lib perl -MXXX -MYAMLScript -e 'XXX + YAMLScript->new->load("!yamlscript/v0\nsay: 2+2")'
Error libyamlscript:
Invalid symbol: '+2'
  at perl/lib/YAMLScript.pm line 81.
ingydotnet commented 9 months ago

Use errgo.io style error messages

ingydotnet commented 9 months ago

Set up error message wiki