Add valuable exception catch for hostname resolving section.