mirror of
https://github.com/vale981/lack
synced 2025-03-05 09:21:39 -05:00
Don't muffle errors in lack.middleware.backtrace by default.
This commit is contained in:
parent
0937577b5c
commit
befd96f5ed
1 changed files with 4 additions and 3 deletions
|
@ -8,9 +8,9 @@
|
|||
(defvar *lack-middleware-backtrace*
|
||||
(lambda (app &key
|
||||
(output '*error-output*)
|
||||
(result-on-error '(500 (:content-type "text/plain") ("Internal Server Error"))))
|
||||
result-on-error)
|
||||
(check-type output (or symbol stream pathname string))
|
||||
(check-type result-on-error (or function cons))
|
||||
(check-type result-on-error (or function cons null))
|
||||
(flet ((error-handler (condition)
|
||||
(if (functionp result-on-error)
|
||||
(funcall result-on-error condition)
|
||||
|
@ -30,7 +30,8 @@
|
|||
(block nil
|
||||
(handler-bind ((error (lambda (condition)
|
||||
(output-backtrace condition env)
|
||||
(return (error-handler condition)))))
|
||||
(when result-on-error
|
||||
(return (error-handler condition))))))
|
||||
(funcall app env)))))))
|
||||
|
||||
(defun print-error (error env &optional (stream *error-output*))
|
||||
|
|
Loading…
Add table
Reference in a new issue