* net-trans.el (transaction-error): New generic function.
authorueno <ueno>
Mon, 14 Aug 2000 16:17:07 +0000 (16:17 +0000)
committerueno <ueno>
Mon, 14 Aug 2000 16:17:07 +0000 (16:17 +0000)
net-trans.el

index de55881..57b3203 100644 (file)
 (luna-define-generic transaction-error-name (trans)
   "Return error symbol of the TRANSACTION.")
 
+(luna-define-generic transaction-error (trans error)
+  "Throw an ERROR of the TRANSACTION.")
+
 (luna-define-method transaction-error-name ((trans transaction))
   (intern (format "%s-error" (luna-class-name trans))))
 
+(luna-define-method transaction-error ((trans transaction) error)
+  (throw (transaction-error-name trans) error))
+
 (defvar transaction-combinator-alist
   '((&& transaction-compose-&&)
     (|| transaction-compose-||)))