From: John Whitington <john@coherentgraphics.co.uk>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] ANN: exn-source - exception backtraces with source code printing
Date: Sun, 19 Oct 2014 19:55:50 +0100 [thread overview]
Message-ID: <54440936.3010001@coherentgraphics.co.uk> (raw)
In-Reply-To: <CAPFanBGJgrBDECesJDUZiXRSwp=ZgbDtRCLjXpKEh8j_7WQV_Q@mail.gmail.com>
Hi Gabriel,
Gabriel Scherer wrote:
> > (we can't use exceptions at all inside a backtrace handler, for example)
>
> I'm a bit surprised by this. Part of the point of reifying traces into
> datatypes (raw_backtrace, backtrace_slot) was to make them persistent.
> set_uncaught_exception_handler is passed a raw trace that should not be
> mutated by raising new exceptions. What breaks if you use exceptions
> inside a backtrace handler?
To quote the documentation for set_uncaught_exception_handler: "If fn
raises an exception, it is ignored."
This is a bit ambiguous -- it might mean
a) The uncaught exception handler you register won't get called from
inside itself in the case of an uncaught exception. Nor will any such
exceptions be handled by the standard exception handler; or
b) Exceptions in the handler literally have no effect.
I've done a little test just now, and it seems to be (a), so perhaps
it's just in need of clarification in the documentation.
(It might be nice to have, for development, an option to have the
default exception handler remain active, so it reports any exceptions
escaping from the user-installed exception handler).
Thanks,
--
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/
next prev parent reply other threads:[~2014-10-19 18:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-19 18:03 John Whitington
2014-10-19 18:26 ` Gabriel Scherer
2014-10-19 18:55 ` John Whitington [this message]
2014-10-19 19:05 ` Gabriel Scherer
[not found] ` <54441347.904@coherentgraphics.co.uk>
2014-10-19 19:50 ` Gabriel Scherer
2014-10-20 9:15 ` Nicolas Boulay
2014-10-20 9:35 ` Peter Zotov
2014-10-20 11:52 ` John Whitington
2014-10-20 12:06 ` Peter Zotov
2014-10-20 12:15 ` Francois Berenger
2014-10-20 18:28 ` Török Edwin
2014-10-23 8:32 ` John Whitington
2014-10-23 11:48 ` Sébastien Hinderer
2014-10-23 16:43 ` Gabriel Scherer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54440936.3010001@coherentgraphics.co.uk \
--to=john@coherentgraphics.co.uk \
--cc=caml-list@inria.fr \
--cc=gabriel.scherer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox