fix: handle error in withTraceNode message action (#2364)
* fix: handle error in withTrace message action * Update src/Lean/Util/Trace.lean Co-authored-by: Gabriel Ebner <gebner@gebner.org> * Update Trace.lean --------- Co-authored-by: Gabriel Ebner <gebner@gebner.org>
This commit is contained in:
parent
aeb60764c1
commit
74e0f09009
1 changed files with 1 additions and 1 deletions
|
|
@ -193,7 +193,7 @@ def withTraceNode [MonadExcept ε m] [MonadLiftT BaseIO m] (cls : Name) (msg : E
|
|||
modifyTraces (oldTraces ++ ·)
|
||||
return (← MonadExcept.ofExcept res)
|
||||
let ref ← getRef
|
||||
let mut m ← msg res
|
||||
let mut m ← try msg res catch _ => pure m!"<exception thrown while producing trace node message>"
|
||||
if profiler.get opts || aboveThresh then
|
||||
m := m!"[{secs}s] {m}"
|
||||
addTraceNode oldTraces cls ref m collapsed
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue