caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Printexc.register_printer without catch
@ 2012-04-13  9:12 Matthias Puech
  2012-04-13  9:18 ` Gabriel Scherer
  2012-04-13  9:33 ` Mark Shinwell
  0 siblings, 2 replies; 6+ messages in thread
From: Matthias Puech @ 2012-04-13  9:12 UTC (permalink / raw)
  To: caml-list

Hello,

Is there a way to change printing of uncaught exceptions in the toplevel 
and in (native/bytecode, 3.12) compiled code without wrapping the whole 
code in a try ... with or in Printexc.catch?

Printexc.catch's documentation says it is deprecated and that the 
runtime system should be able to print exceptions the way they were 
registered with Printexc.register_printer, yet

# Printexc.register_printer begin function Not_found -> Some "hello" | _ 
-> None end;;
# raise Not_found;;
Exception: Not_found.

(* I would expect it to respond [Exception: hello] *)

Do I miss something here?
Thanks in advance,
     -m

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-14 16:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  9:12 [Caml-list] Printexc.register_printer without catch Matthias Puech
2012-04-13  9:18 ` Gabriel Scherer
2012-04-13  9:43   ` Matthias Puech
2012-04-13  9:52     ` Jérémie Dimino
2012-04-13 14:04       ` Matthias Puech
2012-04-13  9:33 ` Mark Shinwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).