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

Suggestion: Flush output before "Fatal error: uncaught exception failure......" #2772

Closed
vicuna opened this issue Jun 2, 2001 · 2 comments
Closed

Comments

@vicuna
Copy link

vicuna commented Jun 2, 2001

Original bug ID: 373
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

If you write a program which prints out information to stdout,
and you get an uncaught exception, the pending contents of
stdout will not be shown.

This makes it easy for a programmer to misinterpret where the
error occurred.

A workaround is to fill the program with 'flush stdout', however
it would be much easier if the top-loop called 'flush stdout', and
maybe other open files before exiting and showing
'Fatal error: uncaught exception...'

/mattias

@vicuna
Copy link
Author

vicuna commented Jun 5, 2001

Comment author: administrator

If you write a program which prints out information to stdout,
and you get an uncaught exception, the pending contents of
stdout will not be shown.
This makes it easy for a programmer to misinterpret where the
error occurred.

This is a very good point. It should be possible to flush at least
stdout and stderr before printing the message. Thanks for the
suggestion.

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Jan 25, 2002

Comment author: administrator

Implemented in OCaml 3.04

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

1 participant