Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005040OCamlOCaml generalpublic2010-04-28 22:362015-12-11 19:26
Assigned Todim 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.02.0+dev 
Summary0005040: The default exception handler doesn't use functions registered with Printexc.register_printer

The default exception handler (called when the program aborts with an uncaught exception) doesn't use functions registered with Printexc.register_printer. Attached is a tentative patch. The only caveat I see so far is that if the printer raises an exception itself, the printed backtrace (if any) will the printer's.


Attached Filespatch file icon 0001-Use-Printexc.to_string-if-possible-in-default-except.patch [^] (2,271 bytes) 2010-04-28 22:36 [Show Content]

- Relationships
related to 0005941closeddim OCaml handler for uncaught exception 

-  Notes
xleroy (administrator)
2010-05-04 15:07

There is a way to preserve the stack backtrace. At this point, I'm wondering whether most of the uncaught exception processing could be done in Caml. The main concern is Out_of_memory conditions. To be continued.
glondu (reporter)
2012-06-21 22:34

The documentation for Printexc.catch says:

  This function is deprecated: the runtime system is
  now able to print uncaught exceptions as precisely
  as Printexc.catch does.

But I think this is not true because of this bug.
Christophe Troestler (reporter)
2014-04-15 22:01

IMHO, this bug is "annoying" when coupled to the fact that the default exception handler does not print floats—there is no way to circumvent that for constructors of interest.
dim (developer)
2014-04-18 17:40

The patch for 5941 closes this issue.

- Issue History
Date Modified Username Field Change
2010-04-28 22:36 glondu New Issue
2010-04-28 22:36 glondu File Added: 0001-Use-Printexc.to_string-if-possible-in-default-except.patch
2010-05-04 15:07 xleroy Note Added: 0005444
2010-05-04 15:07 xleroy Status new => feedback
2012-06-21 22:34 glondu Note Added: 0007606
2012-06-21 22:34 glondu Status feedback => new
2012-06-27 15:47 doligez Status new => confirmed
2013-03-11 21:24 dim Relationship added related to 0005941
2013-09-05 11:49 doligez Tag Attached: patch
2014-04-15 22:01 Christophe Troestler Note Added: 0011286
2014-04-18 17:40 dim Note Added: 0011306
2014-04-18 17:40 dim Status confirmed => resolved
2014-04-18 17:40 dim Fixed in Version => 4.02.0+dev
2014-04-18 17:40 dim Resolution open => fixed
2014-04-18 17:40 dim Assigned To => dim
2015-12-11 19:26 xleroy Status resolved => closed

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker