TritonDataCenter / node-verror

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

Documentation doesn't tell me where WError comes from #20

Closed ronkorving closed 9 years ago

ronkorving commented 9 years ago

Hi,

I'll dig into the code and find out for myself. But what I see is that to get a handle on VError, I need to require this module. So how do I access WError? Where does it come from? Do these become globals on require?

Anyway, I'll find out in a minute, but figured I would first write an issue about the lack of clarity on this so it can be addressed.

davepacheco commented 9 years ago

As you probably figured out by now, it's a property of the module when you require it. There's an example here: https://github.com/davepacheco/node-verror/blob/master/examples/werror.js

ronkorving commented 9 years ago

Thanks :)