joyent/node — Issue #2900: dgram socket.send() throws exceptions instead of invoking callback on DNS lookup failure
Author: othiym23
Created: 2012-03-10 04:01:13+00:00
State: open

For context, see LockerProject/Locker#916.

Looking at lines 146-148 of dns.js, it seems like should the c-ares call fail, the lookup code will throw an exception that isn't trapped and passed off to the callback in dgram.js. This means that right now, to completely handle some expected failure modes, it's necessary to wrap the call (which already has a callback ready to handle errors) in an exception-handling block.