Open faassen opened 12 years ago
Yes, we can!
I discovered since then that busterjs is doing the right thing expecting a 'name' and 'message' in error messages, and JS doesn't let you find out much about random objects to report on them. Still it's better to handle non-conforming exceptions a bit better by trying toString() if 'name' and 'message' are missing as I suggested.
Is there a fix for this yet? I tried some mods, but they all killed the script. This wouldn't work:
[line 607] if (exception && err && (err+'' != exception+'' || err.name != exception)) {
I haven't gotten around to it yet.
On Wed, Sep 5, 2012 at 12:55 AM, Maurice Faber notifications@github.comwrote:
Is there a fix for this yet? I tried some mods, but they all killed the script. This wouldn't work:
[line 607] if (exception && err && (err+'' != exception+'' || err.name != exception)) {
— Reply to this email directly or view it on GitHubhttps://github.com/busterjs/buster/issues/253#issuecomment-8281966.
I'd wanted to fix this things but I cannot found where the repository of buster-assertions is hosted. The URL in package.json reference wrong location. I will make a different issue for this but can someone indicate me the current repository of buster-assertions?
Thank you :-)
buster exception reporting will report 'undefined' unless an exception complies with buster.js by having a 'name' property. To display a message it also must have a 'message' property. This makes debugging difficult.
With qunit, I was used to providing a toString() method for my exception that would help display it, but buster.js seems to completely ignore that. Can we add that?
Could we make buster.js report on non-confirming error messages a bit better in general?