Skip to content

Commit

Permalink
#56 feature switch and backtrace debugging - not really what I want yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicferrier committed Mar 6, 2013
1 parent f1be4a0 commit da29ce9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions elnode.el
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ The hook function is called with the http connection and the
failure state which either the symbol `closed' or the symbol
`failed'.")

(defconst elnode--debug-with-backtraces nil
"Feature switch to include backtrace debugging support.")

(defun elnode--deferred-processor ()
"Process the deferred queue."
(let ((run (random 5000)) ; use this to disambiguate runs in the logs
Expand All @@ -501,8 +504,12 @@ failure state which either the symbol `closed' or the symbol
(cons httpcon (cdr signal-value))
new-deferred))
(error
(elnode--deferred-log elnode-log-critical
"error %s - %s" httpcon signal-value))))
(elnode--deferred-log
elnode-log-critical
"error %s - %s %S" httpcon signal-value
(if elnode--debug-with-backtraces
debugger-previous-backtrace
"")))))
('closed
(elnode--deferred-log elnode-log-info
"closed %s %s" httpcon handler)
Expand Down

1 comment on commit da29ce9

@nicferrier
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not right... I'm not getting the right backtrace from the debugger-previous-backtrace variable.

Please sign in to comment.