Skip to content

Commit

Permalink
Add an error message when the handler type is not a function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescherti committed Nov 15, 2024
1 parent 05790fa commit 991653e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions easysession.el
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,8 @@ SESSION-NAME is the name of the session."
(if (not (and handler
(symbolp handler)
(fboundp handler)))
(easysession--message
"Warning: The following save handler is not a defined function: %s"
handler)
(easysession--warning
"The following save handler is not a defined function: %s" handler)
(let ((result (funcall handler buffers)))
(when result
(let* ((key (alist-get 'key result))
Expand Down Expand Up @@ -993,7 +992,12 @@ SESSION-NAME is the name of the session."
(cond
((and (symbolp handler)
(fboundp handler))
(funcall handler session-data)))))
(funcall handler session-data))

(t
(easysession--warning
"The following load handler is not a defined function: %s"
handler)))))

;; Load the frame set
(easysession--load-frameset session-data
Expand Down

0 comments on commit 991653e

Please sign in to comment.