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

stack trace output on demand #4265

Closed
vicuna opened this issue Apr 18, 2007 · 1 comment
Closed

stack trace output on demand #4265

vicuna opened this issue Apr 18, 2007 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Apr 18, 2007

Original bug ID: 4265
Reporter: sds
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2010-04-29T12:25:57Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @dbuenzli ertai berke

Bug description

I want to be able to output stack trace to a channel:

try Result (foo ())
with e ->
fprintf logstream "error: %s" (error_to_string e);
stack_trace logstream;
Error e

so that I can log both errors and their stack traces in a file for later examination, but still continue running.

@vicuna
Copy link
Author

vicuna commented Mar 18, 2008

Comment author: @xavierleroy

Tentative implementation in CVS trunk, scheduled for inclusion in 3.11.
See the functions print_backtrace and get_backtrace in stdlib module Printexc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants