Added suitable catch of exception in hostname resolving section.
Updated unit tests
Merge pull request #124 from netortik/master

Added suitable catch of exception in hostname resolving section.