Skip to content

Commit

Permalink
Adjust errors display
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontone committed May 31, 2024
1 parent 3169df1 commit df07732
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/conditions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

(defun template-error-string* (error fmt &rest args)
(if *verbose-errors-p*
(format nil "{# Error: ~A : ~A #}"
(apply #'format nil fmt args)
error)
(format nil "{# Error: ~A - ~A #}"
error (apply #'format nil fmt args))
(apply #'template-error-string fmt args)))

(defun template-error (msg &rest args)
Expand Down Expand Up @@ -39,7 +38,8 @@
(defun render-error-template (error destination &key backtrace template context)
"Render the *ERROR-TEMPLATE* with the ERROR, the BACKTRACE and the TEMPLATE
where the error ocurred."
(let ((error-template (compile-template* *error-template*)))
(let ((error-template (compile-template* *error-template*))
(*template-package* (find-package :djula)))
(djula:render-template* error-template destination
:error error
:error-backtrace backtrace
Expand Down

0 comments on commit df07732

Please sign in to comment.