Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005040OCamlOCaml generalpublic2010-04-28 22:362014-04-15 22:01
Reporterglondu 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005040: The default exception handler doesn't use functions registered with Printexc.register_printer
DescriptionHello,

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.


Cheers,

--
Stéphane
Tagspatch
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 0005941assigneddim OCaml handler for uncaught exception 

-  Notes
(0005444)
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.
(0007606)
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.
(0011286)
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.

- 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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker