mu4e: improve server error display

Fixes #2328
This commit is contained in:
Dirk-Jan C. Binnema 2023-01-29 15:39:58 +02:00
parent 3ec960c609
commit 86edc7d5fc
1 changed files with 6 additions and 4 deletions

View File

@ -458,16 +458,18 @@ As per issue #2198."
(cond (cond
((or(eq code 9) (eq code 2)) (message nil)) ((or(eq code 9) (eq code 2)) (message nil))
;;(message "the mu server process has been stopped")) ;;(message "the mu server process has been stopped"))
(t (error (format "mu server process received signal %d" code))))) (t (mu4e-error (format "server process received signal %d" code)))))
((eq status 'exit) ((eq status 'exit)
(cond (cond
((eq code 0) ((eq code 0)
(message nil)) ;; don't do anything (message nil)) ;; don't do anything
((eq code 5)
(error "schema mismatch; please re-init mu from command-line"))
((eq code 19) ((eq code 19)
(error "Database is locked by another process")) (error "mu database is locked by another process"))
(t (error "Mu server process ended with exit code %d" code)))) (t (error "mu server process ended with exit code %d" code))))
(t (t
(error "Something bad happened to the mu server process"))))) (error "something bad happened to the mu server process")))))
(defun mu4e--server-call-mu (form) (defun mu4e--server-call-mu (form)
"Call the mu server with some command FORM." "Call the mu server with some command FORM."