Printexc.to_string and Printexc.raw_backtrace_to_string in combination with Fmt.lines can already be used to perform this, but may be convenient if Fmt already provided this.
The exception message could also be optionally highlighted with a Fmt.style (e.g. bold).
Printexc.to_string
andPrintexc.raw_backtrace_to_string
in combination withFmt.lines
can already be used to perform this, but may be convenient ifFmt
already provided this. The exception message could also be optionally highlighted with aFmt.style
(e.g. bold).