Commit f2940c80 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Fix bug 406:

* lyskom-rest.el (lyskom-report-command-answer): Factor out some
code to lyskom-insert-error.
(lyskom-insert-error): New function.
(lyskom-current-error): Call lyskom-insert-error instead of
issuing a broken call to lyskom-format-insert

* commands1.el (lyskom-add-member-answer): Save err-stat as well
as errno.  Use lyskom-insert-error instead of a broken call to
lyskom-format-insert.  Use the saved errno in all cases, not just
some.
(kom-create-conf): Use lyskom-insert-error instead of a broken
call to lyskom-format-insert.

* commands2.el (kom-change-conf-type): Use lyskom-insert-error
instead of a broken call to lyskom-format-insert.
parent 469520aa
2002-03-03 Per Cederqvist <ceder@lysator.liu.se>
Fix bug 406:
* lyskom-rest.el (lyskom-report-command-answer): Factor out some
code to lyskom-insert-error.
(lyskom-insert-error): New function.
(lyskom-current-error): Call lyskom-insert-error instead of
issuing a broken call to lyskom-format-insert
* commands1.el (lyskom-add-member-answer): Save err-stat as well
as errno. Use lyskom-insert-error instead of a broken call to
lyskom-format-insert. Use the saved errno in all cases, not just
some.
(kom-create-conf): Use lyskom-insert-error instead of a broken
call to lyskom-format-insert.
* commands2.el (kom-change-conf-type): Use lyskom-insert-error
instead of a broken call to lyskom-format-insert.
2002-03-03 Joel Rosdahl <joel@lysator.liu.se>
* utilities.el (lyskom-current-time): Removed obsolete function.
......
......@@ -603,6 +603,7 @@ is the position where the membership was placed."
(progn
(lyskom-insert-string 'nope)
(let* ((errno lyskom-errno)
(err-stat lyskom-err-stat)
(is-supervisor (lyskom-is-supervisor (conf-stat->conf-no conf-conf-stat)
lyskom-pers-no))
(is-member (lyskom-is-member (conf-stat->conf-no conf-conf-stat)
......@@ -615,7 +616,7 @@ is the position where the membership was placed."
pers-conf-stat
conf-conf-stat))
((and rd-prot is-supervisor)
(lyskom-format-insert 'error-code (lyskom-get-error-text errno)))
(lyskom-insert-error errno err-stat))
(rd-prot (let ((supervisorconf (blocking-do
'get-conf-stat
......@@ -627,9 +628,7 @@ is the position where the membership was placed."
(lyskom-format-insert 'cant-find-supervisor
conf-conf-stat))))
(t (lyskom-format-insert 'error-code
(lyskom-get-error-text lyskom-errno)
lyskom-errno)))))
(t (lyskom-insert-error errno err-stat)))))
;;+++Borde {ndra i cachen i st{llet.
(cache-del-pers-stat (conf-stat->conf-no pers-conf-stat))
......@@ -802,9 +801,7 @@ of the person."
(progn
(lyskom-format-insert 'could-not-create-conf
conf-name)
(lyskom-format-insert 'error-code
(lyskom-get-error-text lyskom-errno)
lyskom-errno))
(lyskom-insert-error))
(progn
(let ((conf-stat (blocking-do 'get-conf-stat conf-no)))
(lyskom-format-insert 'created-conf-no-name
......
......@@ -1955,9 +1955,7 @@ Return-value: 'no-session if there is no suitable session to switch to
(conf-type->rsv3
(uconf-stat->conf-type uconf-stat)))))
(progn (lyskom-insert-string 'nope)
(lyskom-format-insert 'error-code
(lyskom-get-error-text lyskom-errno)
lyskom-errno))))))
(lyskom-insert-error))))))
;;; ============================================================
......
......@@ -136,15 +136,25 @@
(if answer
(lyskom-insert-string 'done)
(lyskom-insert-string 'nope)
(lyskom-format-insert 'error-code
(lyskom-get-error-text (or errno lyskom-errno))
(or errno lyskom-errno)
(if errno "" lyskom-err-stat)))
(lyskom-insert-error errno))
answer)
(defun lyskom-insert-error (&optional errno err-stat)
"Insert an error message describing ERRNO and ERR-STAT.
If ERRNO and ERR-STAT are not supplied, use lyskom-errno and
lyskom-err-stat instead. If only ERRNO is supplied, use the empty
string for ERR-STAT."
(lyskom-format-insert 'error-code
(lyskom-get-error-text (or errno lyskom-errno))
(or errno lyskom-errno)
(or err-stat (if errno "" lyskom-err-stat))))
(defun lyskom-current-error ()
"Return a string describing the current error"
(lyskom-format 'error-code (lyskom-get-error-text lyskom-errno) lyskom-errno))
(lyskom-format 'error-code
(lyskom-get-error-text lyskom-errno)
lyskom-errno
lyskom-err-stat))
;;; ----------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment