Skip to content

Commit

Permalink
Handle failed slot delegation differently in rudel-impersonator
Browse files Browse the repository at this point in the history
* rudel-util.el (rudel-impersonator::slot-missing): if something goes
  wrong when accessing the slot of the target object signal the error
  from here
  • Loading branch information
scymtym committed Jul 10, 2010
1 parent 40dedf7 commit e455b32
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions rudel-util.el
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -121,12 +121,17 @@ the slots of some other object as if they were their own slots."
slot-name operation &optional new-value) slot-name operation &optional new-value)
"Look up SLOT-NAME in the state machine associated to THIS." "Look up SLOT-NAME in the state machine associated to THIS."
(let ((target (slot-value this (oref this impersonation-target-slot)))) (let ((target (slot-value this (oref this impersonation-target-slot))))
(case operation (condition-case error
(oref (case operation
(slot-value target slot-name)) (oref

(slot-value target slot-name))
(oset
(set-slot-value target slot-name new-value)))) (oset
(set-slot-value target slot-name new-value)))
(invalid-slot-name
(if (next-method-p)
(call-next-method)
(apply #'signal error)))))
) )




Expand Down

0 comments on commit e455b32

Please sign in to comment.