chiark / gitweb /
net.lisp: Report some more useful errors. master
authorMark Wooding <mdw@distorted.org.uk>
Sun, 4 Feb 2024 19:38:16 +0000 (19:38 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 4 Feb 2024 19:38:16 +0000 (19:38 +0000)
net.lisp

index d245e91186525abea7f8a817d92957e5dae5686c..aa7e395d68dbae2fcb53cecb3dd1fc23a0e0c6a9 100644 (file)
--- a/net.lisp
+++ b/net.lisp
@@ -1162,7 +1162,9 @@ (defun net-parse-to-ipnets (form &optional (family t))
                                 (cons ipn ipns)))
                           ipns
                           :initial-value nil)))
-      (or merged (error "No matching addresses.")))))
+      (or merged
+         (error "No addresses match ~S~:[ in family ~S~;~*~]."
+                form (eq family t) family)))))
 
 (export 'net-host)
 (defun net-host (net-form host &optional (family t))
@@ -1279,7 +1281,8 @@ (defun host-parse (addr &optional (family t))
                                                   :initial-value nil))
                     (car list))))
       (unless (host-addrs host)
-       (error "No matching addresses."))
+       (error "No addresses match ~S~:[ in family ~S~;~*~]."
+              addr (eq family t) family))
       host)))
 
 (export 'host-create)