Debugging "[Error: Uncaught, unspecified 'error' event.]" in Node

My node app has this line appearing sporadically in its output:

[Error: Uncaught, unspecified 'error' event.]

However, there is no callstack or any other information. What's the appropriate way to debug this type of error?

Oh, I was silly enough to be using this code that I found somewhere:

process.on('uncaughtException', function(err) { console.log(err); });

It ended up hiding the interesting data, namely the callstack.