From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q3D9CXA5032694 for ; Fri, 13 Apr 2012 11:12:33 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAPnsh0+CiAFm/2dsb2JhbABFt3uBB4I3EUA9FhgDAgECAVgIAQGICphOoSeOM4MkBJ9ChmCCaQ X-IronPort-AV: E=Sophos;i="4.75,415,1330902000"; d="scan'208";a="140127125" Received: from leb.cs.unibo.it ([130.136.1.102]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 13 Apr 2012 11:12:28 +0200 Received: from ssl.cs.unibo.it (ssl.cs.unibo.it [127.0.0.1]) (Authenticated sender: hidden) by leb.cs.unibo.it (Postfix) with ESMTPSA id 21CD92365 for ; Fri, 13 Apr 2012 11:12:27 +0200 (CEST) Message-ID: <4F87EDFB.6090409@cs.unibo.it> Date: Fri, 13 Apr 2012 11:12:27 +0200 From: Matthias Puech User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Caml-list] Printexc.register_printer without catch 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