mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 06:16:11 +02:00
✨ Minor improvements on error reporting mechanism.
This commit is contained in:
parent
ef17af38a1
commit
ffdd539233
6 changed files with 59 additions and 45 deletions
|
@ -112,13 +112,16 @@
|
|||
|
||||
(render-template [report]
|
||||
(binding [ppr/*print-right-margin* 300]
|
||||
(let [context (dissoc report :trace :cause :params :data :spec-prob :spec-problems :error :explain)
|
||||
(let [context (dissoc report :trace :cause :params :data :spec-problems :spec-value :error :explain :hint :message)
|
||||
params {:context (with-out-str (ppr/pprint context))
|
||||
:data (:data report)
|
||||
:trace (or (:cause report)
|
||||
(:trace report)
|
||||
(some-> report :error :trace))
|
||||
:params (:params report)}]
|
||||
:hint (:hint report)
|
||||
:spec-problems (:spec-problems report)
|
||||
:spec-value (:spec-value report)
|
||||
:data (:data report)
|
||||
:trace (or (:cause report)
|
||||
(:trace report)
|
||||
(some-> report :error :trace))
|
||||
:params (:params report)}]
|
||||
(-> (io/resource "error-report.tmpl")
|
||||
(tmpl/render params)))))
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue