branch: master
commit 24811ee757301b782d30457c5015db482d0e1897
Author: John Wiegley <[email protected]>
Commit: John Wiegley <[email protected]>
Show full backtraces if `async-debug' is non-nil
---
async.el | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/async.el b/async.el
index 11ee5c2..e951b69 100644
--- a/async.el
+++ b/async.el
@@ -139,14 +139,19 @@ as follows:
(defun async-batch-invoke ()
"Called from the child Emacs process' command-line."
- (setq async-in-child-emacs t)
- (condition-case err
+ (setq async-in-child-emacs t
+ debug-on-error async-debug)
+ (if debug-on-error
(prin1 (funcall
(async--receive-sexp (unless async-send-over-pipe
command-line-args-left))))
- (error
- (backtrace)
- (prin1 `(async-signal . ,err)))))
+ (condition-case err
+ (prin1 (funcall
+ (async--receive-sexp (unless async-send-over-pipe
+ command-line-args-left))))
+ (error
+ (backtrace)
+ (prin1 `(async-signal . ,err))))))
(defun async-ready (future)
"Query a FUTURE to see if the ready is ready -- i.e., if no blocking