Please throw actual Errors, not strings
Opened this issue · 2 comments
axefrog commented
When step throws an exception, it just throws the string, rather than an actual Error
object. This is bad because when an error is thrown, there is no stack trace to work with, so it's difficult to figure out the source of the error.
throw new Error('whatever');
bminer commented
dotnetCarpenter commented
According to this article throw 'string error
does not provide the same info as throw new Error("error string")
A String is not an Error - http://www.devthought.com/2011/12/22/a-string-is-not-an-error/