Changeset 7404


Ignore:
Timestamp:
Oct 12, 2007, 9:39:21 AM (12 years ago)
Author:
gb
Message:

NOT-LOCKED, DEADLOCK lock-related conditions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0710/ccl/level-1/l1-error-system.lisp

    r7126 r7404  
    262262             (format s "Current process ~s does not own lock ~s"
    263263                     *current-process* (slot-value c 'lock)))))
     264
     265(define-condition not-locked (lock-protocol-error)
     266  ()
     267  (:report (lambda (c s)
     268             (format s "Lock ~s isn't locked." (slot-value c 'lock)))))
     269
     270(define-condition deadlock (lock-protocol-error)
     271  ()
     272  (:report (lambda (c s)
     273             (format s "Requested operation on ~s would cause deadlock." (slot-value c 'lock)))))
    264274
    265275(define-condition package-error (error)
     
    576586  "Make an instance of a condition object using the specified initargs."
    577587  (declare (dynamic-extent init-list))
    578   (let ((class (or (and (symbolp name) (find-class name nil))
    579                    name)))
    580     (if (condition-p (class-prototype class))
    581         (apply #'make-instance class init-list)
    582         (error "~S is not a defined condition type name" name))))
     588  (if (subtypep name 'condition)
     589    (apply #'make-instance name init-list)
     590    (error "~S is not a defined condition type name" name)))
    583591
    584592(defmethod print-object ((c condition) stream)
Note: See TracChangeset for help on using the changeset viewer.