Toplevel: toplevel swallows exception in installed custom printers #7060
Original bug ID: 7060
When evaluating an expression for whose type a custom printer is installed, if the evaluation results in an exception, the toplevel catches the exception but prints the uninformative "printer xx raised an exception" (genprintval.ml 151-152). On the other hand, if the expression has no custom printer installed, the toplevel prints the exception itself.
Note in the below example that the toplevel already prints the type of the expression as if the value were available.
Steps to reproduce
With the following ADT:
module M : sig
Then in the toplevel:
M.pp_print Format.std_formatter (M.inj (-3));;
Exception: Invalid_argument "M".
The text was updated successfully, but these errors were encountered: