Ignore:
Timestamp:
Jul 21, 2007, 10:40:27 PM (12 years ago)
Author:
gb
Message:

Try to recognize foreign exceptions (e.g., as NSExceptions.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-error-signal.lisp

    r5315 r6936  
    5454    (%err-disp-common err-num err-typ format-string errargs frame-ptr)))
    5555
     56(defparameter *foreign-error-condition-recognizers* ())
     57
     58
    5659(defun %err-disp-common (err-num err-typ format-string errargs frame-ptr)
    5760  (let* ((condition-name (or (uvref *simple-error-types* err-typ)
     
    9497               nil
    9598               frame-ptr)
    96       (funcall '%error format-string errargs frame-ptr))))
     99      (let* ((cond nil))
     100        (if (and (eql err-num $XFOREIGNEXCEPTION)
     101                 (dolist (recog *foreign-error-condition-recognizers*)
     102                   (let* ((c (funcall recog (car errargs))))
     103                     (when c (return (setq cond c))))))
     104          (funcall '%error cond nil frame-ptr)
     105          (funcall '%error format-string errargs frame-ptr))))))
    97106
    98107(defun error (condition &rest args)
Note: See TracChangeset for help on using the changeset viewer.