Is there a ppx / some macro trick for handling the following:
I want something where
input:
EXPR : some OCaml expr
msg: String
output:
try EXPR with
err -> failwith(Printf.sprintf "%s\n%s\n" err msg)
The point is: I want to provide extra information on an exception, a “fake manual stacktrace” of sorts.
I don’t need exactly the above; just the gist of the above.