aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ipaddr.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb
index 60f102d4e6..09645f500c 100644
--- a/lib/ipaddr.rb
+++ b/lib/ipaddr.rb
@@ -594,6 +594,8 @@ class IPAddr
else
@mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK
end
+ rescue InvalidAddressError => e
+ raise e.class, "#{e.message}: #{addr}"
end
def coerce_other(other)