Just this week I had to diagnose a program that kept failing to perform a DNS lookup. At least that was the error message. What it wasn't telling me was the thread responsible for performing the network communication was throwing an exception before it ever got to the lookup.