From 986d88c39d06c58fb23a7dfad037fec8235164b0 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Fri, 16 Aug 2019 16:07:35 +0200 Subject: [PATCH] Report error on unsupported selector type. --- elpher.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elpher.el b/elpher.el index 99c6f11..ea95aee 100644 --- a/elpher.el +++ b/elpher.el @@ -304,8 +304,12 @@ unless PRESERVE-PARENT is non-nil." (if getter (funcall getter) (let* ((address (elpher-node-address node)) - (type (elpher-address-type address))) - (funcall (car (alist-get type elpher-type-map)))))) + (type (elpher-address-type address)) + (type-record (alist-get type elpher-type-map))) + (if (listp type-record) + (funcall (car type-record)) + (elpher-visit-parent-node) + (error "Unsupported gopher selector type '%c'" type))))) (defun elpher-visit-parent-node () "Visit the parent of the current node." -- 2.20.1