aboutsummaryrefslogtreecommitdiff
path: root/topbin
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-01-31 15:57:45 +0100
committerEmilio Jesus Gallego Arias2020-02-24 12:24:40 -0500
commitc216daf5d5f8215947bce10e55d30c35be1a56ba (patch)
treed8b7eaf494bf01ee63d462d54ff85a67359f7c2a /topbin
parent46fe9b26ad55a266b71bbd428ee406b03a9db030 (diff)
[exn] Forbid raising in exn printers, make them return Pp.t option
Raising inside exception printers is quite tricky as the order of registration for printers will indeed depend on the linking order. We thus forbid this, and make our API closer to the upstream `Printexn` by having printers return an option type.
Diffstat (limited to 'topbin')
-rw-r--r--topbin/coqtop_byte_bin.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/topbin/coqtop_byte_bin.ml b/topbin/coqtop_byte_bin.ml
index 604c6e251a..7e977ca0f2 100644
--- a/topbin/coqtop_byte_bin.ml
+++ b/topbin/coqtop_byte_bin.ml
@@ -11,9 +11,9 @@
(* We register this handler for lower-level toplevel loading code *)
let _ = CErrors.register_handler (function
| Symtable.Error e ->
- Pp.str (Format.asprintf "%a" Symtable.report_error e)
+ Some (Pp.str (Format.asprintf "%a" Symtable.report_error e))
| _ ->
- raise CErrors.Unhandled
+ None
)
let drop_setup () =