Skip to content

Commit

Permalink
Fix condition-case
Browse files Browse the repository at this point in the history
Only handle the wrong-type-argument error we expect when
file-truename's first arguent is nil.
  • Loading branch information
johnhamelink committed Feb 22, 2024
1 parent e5d4021 commit b59a2e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions chatu-drawio.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
:type 'function)

(defun chatu-drawio--find-executable ()
"Find the drawio executable on PATH, or else return nil."
(condition-case nil
"Find the drawio executable on PATH, or else return an error."
(condition-case err
(file-truename (executable-find "draw.io"))
(error nil)))
(wrong-type-argument
(message "Cannot find the draw.io executable on the PATH."))))

(defun chatu-drawio-script (keyword-plist)
"Get conversion script.
Expand Down

0 comments on commit b59a2e0

Please sign in to comment.