Advertisement
Guest User

condition test

a guest
Aug 12th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.30 KB | None | 0 0
  1. (define-condition test-condition (error)
  2.   ((test-slot :reader test-slot :initarg :test-slot)))
  3.  
  4. (defun test-function ()
  5.   (restart-case
  6.       (error 'test-condition :test-slot 1)
  7.     (testable-restart ()
  8.       :report "Visible restart."
  9.       :test (lambda (c) (eql (test-slot c) 1))
  10.       nil)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement