Make lookup handlers easier to debug
If debug-mode is on, errors in lookup handlers will not emit a full backtrace.
This commit is contained in:
parent
b58199ca61
commit
fb8b7c38d2
1 changed files with 3 additions and 3 deletions
|
@ -113,9 +113,9 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g.
|
||||||
|
|
||||||
(defun +lookup--run-handlers (handler identifier origin)
|
(defun +lookup--run-handlers (handler identifier origin)
|
||||||
(doom-log "Looking up '%s' with '%s'" identifier handler)
|
(doom-log "Looking up '%s' with '%s'" identifier handler)
|
||||||
(condition-case e
|
(condition-case-unless-debug e
|
||||||
(let ((wconf (current-window-configuration))
|
(let ((wconf (current-window-configuration))
|
||||||
(result (condition-case e
|
(result (condition-case-unless-debug e
|
||||||
(+lookup--run-handler handler identifier)
|
(+lookup--run-handler handler identifier)
|
||||||
(error
|
(error
|
||||||
(doom-log "Lookup handler %S threw an error: %s" handler e)
|
(doom-log "Lookup handler %S threw an error: %s" handler e)
|
||||||
|
@ -130,7 +130,7 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g.
|
||||||
(/= (point-marker) origin))
|
(/= (point-marker) origin))
|
||||||
(prog1 (point-marker)
|
(prog1 (point-marker)
|
||||||
(set-window-configuration wconf)))))
|
(set-window-configuration wconf)))))
|
||||||
((error user-error debug)
|
((error user-error)
|
||||||
(message "Lookup handler %S: %s" handler e)
|
(message "Lookup handler %S: %s" handler e)
|
||||||
nil)))
|
nil)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue