TritonDataCenter / node-verror

Rich JavaScript errors
MIT License
1.18k stars 61 forks source link

drop special handling for VError's toString() #5

Closed trentm closed 11 years ago

trentm commented 11 years ago

The reasoning here is that most (all?) other Error class 'toString()' methods include the error name as a prefix to the message. No reason for VError to be special here.

davepacheco commented 11 years ago

This must have been due to me conflating "toString()" with .message. The whole point of VError was to be able to have tools and services emit an error message that didn't look like a Java error (with a constructor and such), but more like a Unix error. But that's what .message does, and I don't think toString() needs to do that too.