[Bug 64] New: Unhandled errors should go to stderr

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 22 03:24:02 PST 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=64

           Summary: Unhandled errors should go to stderr
           Product: D
           Version: 0.150
          Platform: All
               URL: http://www.digitalmars.com/drn-
                    bin/wwwnews?digitalmars.D.bugs/2001
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: critical
          Priority: P1
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: smjg at iname.com


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


-- 




More information about the Digitalmars-d-bugs mailing list