moonscript icon indicating copy to clipboard operation
moonscript copied to clipboard

need more descriptive errors

Open ghost opened this issue 10 years ago • 6 comments

When running file 'test.moon' with following (incorrect) syntax:

class Thing name: "unknown"

class Person extends Thing say_name: => print "Hello, I am", @name

with Person! .name = "MoonScript" \say_name!

I get the following error: Sergeys-MacBook-Pro:moonscript_orig sergey$ bin/moon ../moonscript/test.moon Compile error: Short-dot syntax must be called within a with block

Error does not have filename or a line number which makes it hard to find such an error in code

ghost avatar Jun 17 '14 19:06 ghost

Missing line number is a bug, thanks for the report

leafo avatar Jun 17 '14 20:06 leafo

filename would be awesome too. helps to easier find an error in a multi file application

ghost avatar Jun 17 '14 20:06 ghost

Definitely, it looks like that particular error message is bypassing the regular error reporting mechanism accidentally. Normally there is file and line number, along with a preview of the line that generated the error.

leafo avatar Jun 17 '14 20:06 leafo

Just got this today, still not fixed?

Thource avatar Aug 14 '15 21:08 Thource

Hello, writing this to notify that this issue is still not resolved.

InfiniteRain avatar May 06 '18 17:05 InfiniteRain

Still not fixed it seems. Good old-fashioned comment-out bisection helps though.

bpj avatar Jan 28 '22 10:01 bpj