caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ANN: exn-source  - exception backtraces with source code printing
@ 2014-10-19 18:03 John Whitington
  2014-10-19 18:26 ` Gabriel Scherer
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: John Whitington @ 2014-10-19 18:03 UTC (permalink / raw)
  To: caml-list

Hi,

OCaml 4.02 has new facilities for installing a new backtrace handler, 
and processing the back trace symbolically. As a little proof of 
concept, I've built a package which you can add to any project to get 
backtrace with source code printed and highlighted:

https://github.com/johnwhitington/exn-source

Here's the start of a backtrace:

http://www.coherentpdf.com/exnsource.png

By default, it prints five lines either side, and looks the current 
directory for source code. But as one can see from the screenshot, one 
can add /usr/local/lib/ocaml to get stdlib source and so on...

It's somewhat difficult to test this kind of thing (we can't use 
exceptions at all inside a backtrace handler, for example), so I'm 
appealing for help. Attach exn-source to your code and let me know how 
you get on...

Thanks,

-- 
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/


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

end of thread, other threads:[~2014-10-23 16:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 18:03 [Caml-list] ANN: exn-source - exception backtraces with source code printing John Whitington
2014-10-19 18:26 ` Gabriel Scherer
2014-10-19 18:55   ` John Whitington
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

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).