From 626acb6d5e3f35397ca434a2509861715bb6b5e7 Mon Sep 17 00:00:00 2001 From: Gerd Heber Date: Sat, 2 Apr 2016 08:54:47 -0400 Subject: [PATCH] Better error handling. --- src/special-smsts.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/special-smsts.lisp b/src/special-smsts.lisp index 3915575..aaeae7b 100644 --- a/src/special-smsts.lisp +++ b/src/special-smsts.lisp @@ -487,12 +487,13 @@ (ecase (length args) (0 t) (1 (let ((a (first args))) - (when (dimp a) + (if (dimp a) (unless (infinityp a) - (setq k a))))) + (setq k a)) + (error "~A is not a positive FIXNUM." a)))) (2 (let ((a (first args)) (b (first (last args)))) - (when (and (and (dimp a) + (if (and (and (dimp a) (dimp b)) (or (not (infinityp a)) (not (infinityp b)))) @@ -500,7 +501,8 @@ ((infinityp a) (setq k b)) ((infinityp b) (setq k a)) ((<= a b) (setq l b k a)) - (t (setq l a k b))))))) + (t (setq l a k b))) + (error "At most two arguments of type FIXNUM or value :INFINITY are expected,~%and at most one of them can be :INFINITY."))))) (the simplicial-set (build-smst :cmpr #'R-proj-space-cmpr