caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Feature wish: Localization information for exceptions
@ 2005-10-08 18:35 Jan Kybic
       [not found] ` <434A6E4C.1080008@gaillourdet.net>
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kybic @ 2005-10-08 18:35 UTC (permalink / raw)
  To: caml-list

Hello,
        I have a wish: would it be possible to print some kind of localization
information when a native code Ocaml program is aborted due to
exceptions such as 'index out of bounds' or 'Stack overflow'?
When a program is aborted due to failed 'assert', this information is
printed, so I thought maybe it would not be so difficult to do it for other
exceptions too. At least knowing which function threw the exception would
be great.

Otherwise, localizing the cause of the error is quite time
consuming. I know there is a debugger for byte code programs which can
be used but for my applications (numerical calculations) the byte-code
programs are too slow. 

If I remember correctly there is a patch for the Ocaml compiler to
print the stack trace when program is aborted on exceptions. Are there
plans to include such a patch into the official compiler?

While I am at it, is there any chance of using native-code debugger
for Ocaml? That would be an equally acceptable solution.

For the moment, I am forced to instrument my program with frequent
debug prints so that I can localize the problem spot. And since I need
that these debug prints be completely removed for the production
version in order not to slow it down, I am surrounding each debug
print command with IFDEF DEBUG .. ELSE () ENDIF which is quite
cumbersome and obscures the code itself. Is there any other solution?


Thank you,

Jan

-- 
-------------------------------------------------------------------------
Jan Kybic <kybic@fel.cvut.cz>                       tel. +420 2 2435 5721
http://cmp.felk.cvut.cz/~kybic                      ICQ 200569450


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

end of thread, other threads:[~2005-10-10 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-08 18:35 Feature wish: Localization information for exceptions Jan Kybic
     [not found] ` <434A6E4C.1080008@gaillourdet.net>
2005-10-10 14:25   ` [Caml-list] " Jan Kybic

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