* Riece: Version 0.0.3 released.
authorueno <ueno>
Mon, 2 Jun 2003 02:10:28 +0000 (02:10 +0000)
committerueno <ueno>
Mon, 2 Jun 2003 02:10:28 +0000 (02:10 +0000)
* riece-version.el (riece-version-number): Bump up to 0.0.3.

* riece-ctcp.el (riece-handle-ctcp-request): Catch errors occured
in hooks.
(riece-handle-ctcp-response): Ditto.

lisp/ChangeLog
lisp/riece-ctcp.el
lisp/riece-version.el

index 678c6f3..f3ae1a0 100644 (file)
@@ -1,3 +1,12 @@
+2003-06-02  Daiki Ueno  <ueno@unixuser.org>
+
+       * Riece: Version 0.0.3 released.
+       * riece-version.el (riece-version-number): Bump up to 0.0.3.
+
+       * riece-ctcp.el (riece-handle-ctcp-request): Catch errors occured
+       in hooks.
+       (riece-handle-ctcp-response): Ditto.
+
 2003-06-01  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-user.el (riece-rename-user): Don't modify entry when
index d333af1..f13a1d6 100644 (file)
          (let ((request (downcase (match-string 1 message))))
            (if (match-beginning 2)
                (setq message (substring (match-string 2 message) 1)))
-           (unless (run-hook-with-args-until-success
-                    (intern (concat "riece-ctcp-" request "-request-hook"))
-                    prefix (car targets) message)
-             (let ((function (intern-soft (concat "riece-handle-ctcp-"
-                                                  request
-                                                  "-request"))))
+           (let ((hook
+                  (intern (concat "riece-ctcp-" request "-request-hook")))
+                 (function
+                  (intern-soft (concat "riece-handle-ctcp-" request
+                                       "-request")))
+                 (after-hook
+                  (intern (concat "riece-ctcp-after-" request
+                                  "-request-hook"))))
+             (unless (condition-case error
+                         (run-hook-with-args-until-success
+                          hook prefix (car targets) message)
+                       (error
+                        (if riece-debug
+                            (message "Error occurred in `%S': %S" hook error))
+                        nil))
                (if function
                    (condition-case error
                        (funcall function prefix (car targets) message)
                       (if riece-debug
                           (message "Error occurred in `%S': %S"
                                    function error))))))
-             (run-hook-with-args-until-success
-              (intern (concat "riece-ctcp-after-" request "-request-hook"))
-              prefix (car targets) message))
+             (condition-case error
+                 (run-hook-with-args-until-success
+                  after-hook prefix (car targets) message)
+               (error
+                (if riece-debug
+                    (message "Error occurred in `%S': %S"
+                             after-hook error)))))
            t)))))
 
 (defun riece-handle-ctcp-version-request (prefix target string)
          (let ((response (downcase (match-string 1 message))))
            (if (match-beginning 2)
                (setq message (substring (match-string 2 message) 1)))
-           (unless (run-hook-with-args-until-success
-                    (intern (concat "riece-ctcp-" response "-response-hook"))
-                    prefix (car targets) message)
-             (let ((function (intern-soft (concat "riece-handle-ctcp-"
-                                                  response
-                                                  "-response"))))
+           (let ((hook
+                  (intern (concat "riece-ctcp-" response "-response-hook")))
+                 (function (intern-soft (concat "riece-handle-ctcp-"
+                                                response "-response")))
+                 (after-hook
+                  (intern (concat "riece-ctcp-after-" response
+                                  "-response-hook"))))
+             (unless (condition-case error
+                         (run-hook-with-args-until-success
+                          hook prefix (car targets) message)
+                       (error
+                        (if riece-debug
+                            (message "Error occurred in `%S': %S" hook error))
+                        nil))
                (if function
                    (condition-case error
                        (funcall function prefix (car targets) message)
                       (if riece-debug
                           (message "Error occurred in `%S': %S"
                                    function error))))))
-             (run-hook-with-args-until-success
-              (intern (concat "riece-ctcp-after-" response "-response-hook"))
-              prefix (car targets) message))
+             (condition-case error
+                 (run-hook-with-args-until-success
+                  after-hook prefix (car targets) message)
+               (error
+                (if riece-debug
+                    (message "Error occurred in `%S': %S"
+                             after-hook error)))))
            t)))))
 
 (defun riece-handle-ctcp-version-response (prefix target string)
index b4bdc32..2bf3fa3 100644 (file)
@@ -48,7 +48,7 @@ string, be sure to use a valid format, see RFC 2616."
 
 (defconst riece-product-name "Riece")
 
-(defconst riece-version-number "0.0.2"
+(defconst riece-version-number "0.0.3"
   "Version number for this version of Riece.")
 
 (defconst riece-version (format "Riece v%s" riece-version-number)