Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default exception handler doesn't use functions registered with Printexc.register_printer #5040

Closed
vicuna opened this Issue Apr 28, 2010 · 4 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

commented Apr 28, 2010

Original bug ID: 5040
Reporter: @glondu
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:26:38Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.02.0+dev
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Related to: #5941
Monitored by: maizatulin @gasche mehdi "Dmitry Grebeniuk" @diml @ygrek jmeber @hcarty @Chris00

Bug description

Hello,

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

File attachments

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented May 4, 2010

Comment author: @xavierleroy

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 21, 2012

Comment author: @glondu

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 15, 2014

Comment author: @Chris00

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 18, 2014

Comment author: @diml

The patch for 5941 closes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.