Closed diclophis closed 5 years ago
THIS
haha, @Schwad could you elaborate on your comment a bit... I have a patch pending here for this issue: https://github.com/rails/ruby-coffee-script/pull/8
The causes of our errors might be different, mine wasn't even showing a file properly, it appears the break was from running sprockets 4.0.0.beta.2 on my machine, as I'm no longer running the error. It's just when I was running into coffeescript errors historically it was not verbose in the source.
Due to the wrapping and mutating of
SyntaxErrors
here: https://github.com/rails/ruby-coffee-script/blob/master/lib/coffee_script.rb#L29The full context/message of the coffeescript syntax error is missing.
Note the first screenshot shows the current error message when we have a coffeescript error
This second screenshot is the same error, except with the "wrapper" code on line #29 of
coffee_script.rb
removed...Can the wrapper code be updated to better capture more context of coffeescript errors, and or is the wrapping and special handling of SyntaxErrors necessary at all?