Exception handling for invalid IP addresses

If there are invalid IP addresses in the registry, provides
an error message to that effect.