Created
September 26, 2016 02:53
-
-
Save vermiculus/c8355adb8b782f32387c4e0916d18da3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Show a backtrace whenever an error is encountered | |
(defun user-error-to-backtrace (&rest r) | |
(with-current-buffer-window | |
(get-buffer-create "*issue*") | |
#'display-buffer-pop-up-window nil | |
(insert (kill-new (with-output-to-string (backtrace)))))) | |
(mapc (lambda (e) (advice-remove e #'user-error-to-backtrace)) | |
'(user-error error)) | |
(mapc (lambda (e) (advice-add e :before #'user-error-to-backtrace)) | |
'(user-error error)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment