From e94589dd6615c61b70dd1f0302f846ca17bd33a1 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola <nikodemus@random-state.net> Date: Mon, 7 Jul 2008 11:51:14 +0300 Subject: [PATCH] implement SIMPLE-PROGRAM-ERROR --- conditions.lisp | 8 ++++++++ package.lisp | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/conditions.lisp b/conditions.lisp index f68fe63..85d2812 100644 --- a/conditions.lisp +++ b/conditions.lisp @@ -37,6 +37,14 @@ a default value for required keyword arguments." :format-control message :format-arguments args)) +(define-condition simple-program-error (simple-error program-error) + ()) + +(defun simple-program-error (message &rest args) + (error 'simple-program-error + :format-control message + :format-arguments args)) + (defmacro ignore-some-conditions ((&rest conditions) &body body) "Similar to CL:IGNORE-ERRORS but the (unevaluated) CONDITIONS list determines which specific conditions are to be ignored." diff --git a/package.lisp b/package.lisp index 96f6526..d2924a4 100644 --- a/package.lisp +++ b/package.lisp @@ -2,19 +2,28 @@ (:nicknames :alexandria) (:use :cl) (:export + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; BLESSED + ;; ;; Binding constructs #:if-let #:when-let #:when-let* - ;; Definitions - #:define-constant + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; REVIEW IN PROGRESS + ;; ;; Control flow #:cswitch #:eswitch - #:nth-value-or #:switch + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; REVIEW PENDING + ;; + #:nth-value-or #:whichever #:xor + ;; Definitions + #:define-constant ;; Hash tables #:alist-hash-table #:copy-hash-table @@ -124,6 +133,7 @@ #:simple-style-warning #:simple-reader-error #:simple-parse-error + #:simple-program-error #:unwind-protect-case ;; Features #:featurep -- GitLab