Basically, why isn\'t this exception caught?
var http = require(\'http\'), options = { host: \'www.crash-boom-bang-please.com\', port: 80,
When you are throwing the error the try {} block has been long left, as the callback is invoked asynchronously outside of the try/catch. So you cannot catch it.
try {}
Do whatever you want to do in case of an error inside the error callback function.