mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Redesign Doom error handling
Another refactor, again to improve the locality of doom errors and make the data that accompanies them more useful in determining the origin and source of issues. Also, bin/doom is now a little more informative about how to debug errors.
This commit is contained in:
17
bin/doom
17
bin/doom
@ -85,5 +85,18 @@
|
||||
((let ((default-directory emacs-dir))
|
||||
(setq argv nil
|
||||
noninteractive 'doom)
|
||||
(doom-dispatch args)))))
|
||||
|
||||
(condition-case e (doom-dispatch args)
|
||||
((debug error)
|
||||
(message "--------------------------------------------------\n")
|
||||
(message "There was an unexpected error:")
|
||||
(message " %s (%s)" (get (car e) 'error-message) (car e))
|
||||
(dolist (item (cdr e))
|
||||
(message " %s" item))
|
||||
(unless debug-on-error
|
||||
(message
|
||||
(concat "\nRun the command again with the -d (or --debug) option to enable debug\n"
|
||||
"mode and, hopefully, generate a stack trace. If you decide to file a bug\n"
|
||||
"report, please include it!\n\n"
|
||||
"Emacs outputs to standard error, so you'll need to redirect stderr to\n"
|
||||
"stdout to pipe this to a file or clipboard!\n\n"
|
||||
" e.g. doom -d install 2>&1 | clipboard-program")))))))))
|
||||
|
Reference in New Issue
Block a user