Ignore:
Timestamp:
02/08/05 02:41:45 (16 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/restart.lisp

    r8423 r8502  
    22;;;
    33;;; Copyright (C) 2003-2005 Peter Graves
    4 ;;; $Id: restart.lisp,v 1.18 2005-01-31 17:17:30 piso Exp $
     4;;; $Id: restart.lisp,v 1.19 2005-02-08 02:41:45 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    8787        (return-from find-restart restart)))))
    8888
     89(defun find-restart-or-control-error (identifier &optional condition)
     90  (or (find-restart identifier condition)
     91      (error 'control-error
     92       :format-control "Restart ~S is not active."
     93       :format-arguments (list identifier))))
     94
    8995(defun invoke-restart (restart &rest values)
    90   (let ((real-restart (or (find-restart restart)
    91                           (error 'control-error
    92                                  :format-control "Restart ~s is not active."
    93                                  :format-arguments (list restart)))))
     96  (let ((real-restart (find-restart-or-control-error restart)))
    9497    (apply (restart-function real-restart) values)))
    9598
     
    235238
    236239(defun abort (&optional condition)
    237   (invoke-restart 'abort)
     240  (invoke-restart (find-restart-or-control-error 'abort condition))
    238241  (error 'control-error
    239242         :format-control "ABORT restart failed to transfer control dynamically."))
    240243
    241244(defun muffle-warning (&optional condition)
    242   (invoke-restart 'muffle-warning))
     245  (invoke-restart (find-restart-or-control-error 'muffle-warning condition)))
    243246
    244247(defun continue (&optional condition)
Note: See TracChangeset for help on using the changeset viewer.