Bug 64 – Unhandled errors should go to stderr

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-03-22T05:24:00Z
Last change time
2014-02-15T13:16:29Z
Keywords
diagnostic, EH, patch
Assigned to
bugzilla
Creator
smjg

Comments

Comment #0 by smjg — 2006-03-22T05:24:00Z
When an exception is thrown and the application doesn't handle it, the default handler outputs the error message to stdout. This is wrong. It should go to stderr. That's exactly what stderr's there for. Walter once claimed that he doesn't really like stderr, apparently because versions of Windows prior to 2000 don't provide a means of redirecting it. I have debunked this excuse at least three times over: 1. By pointing out that the spec states that "the program gracefully exits through the default error handler with an appropriate message". Redirecting error output when the user didn't ask for it, be it to a file, a filter or a program such as Doxygen, is most ungraceful. 2. By stating that whether to redirect errors along with normal output should be up to the user, not the programmer, and certainly not the creator of the language that the program is written in. 3. By writing Rederr and releasing it on digitalmars.D.announce: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.announce/1518 The fix was written ages ago: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368
Comment #1 by braddr — 2006-03-23T01:23:07Z
Sorry, choice of stdout vs stderr for the last ditch catch isnt: Critical crashes, loss of data, severe memory leak P1 so bad that an update needs to happen immediately; i.e. it makes D unusable I've lowered it back to normal and P2. I do agree that stderr is more appropriate.
Comment #2 by smjg — 2006-03-23T04:22:06Z
Sorry, I was thinking of it as silent generation of bad code, which Walter once suggested should count as critical. Should've finished reading that discussion I guess....
Comment #3 by smjg — 2006-09-10T19:07:10Z
The fix is now here: http://www.digitalmars.com/d/archives/digitalmars/D/bugs/3170.html May I propose an alternative meaning for P1 - namely "The fix has been written and should be folded in right now"?
Comment #4 by smjg — 2006-09-14T18:03:03Z
That was the thread with the fix to remove Object.print and the implicitly imported printf, with a follow-on fix for this. The fix that just fixes this bug is, of course, at http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4368
Comment #5 by smjg — 2006-12-05T16:04:31Z
(In reply to comment #3) > May I propose an alternative meaning for P1 - namely "The fix has been written > and should be folded in right now"? No reply => going for it. Time's too short to waste any more.
Comment #6 by bugzilla — 2007-03-29T19:04:03Z
Fixed DMD 1.010
Comment #7 by github-bugzilla — 2012-05-07T12:29:27Z
Comment #8 by github-bugzilla — 2012-05-07T12:29:41Z
Comment #9 by github-bugzilla — 2012-05-11T19:02:58Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a8ffc8ab60aa3e1ae965e5764f0900e14a0881c1 Fix issue 7546 64-bit floating-point issue with negative zero: -0.0 == 0.0 is false Just duplicate the code for float == float.