yaml.js icon indicating copy to clipboard operation
yaml.js copied to clipboard

Actually extend from Error

Open seangenabe opened this issue 9 years ago • 1 comments

It's not simple trying to extend from Error. I have observed that errors from this module lack prototype and stack (which is very important for debugging). I've done some research and from jashkenas/coffeescript#2956 it seems that Coffeescript does not intend to fix that, though there's a suggestion there, maybe we can try that?

class MyError extends Error then constructor: -> super

seangenabe avatar Oct 16 '15 17:10 seangenabe

Sounds reasonable if it fixes the issue, feel free to make a PR to develop with this change

jeremyfa avatar Oct 17 '15 08:10 jeremyfa