http://d.puremagic.com/issues/show_bug.cgi?id=10344


Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #1 from Steven Schveighoffer <[email protected]> 2013-06-12 
12:09:06 PDT ---
On one hand, I disagree that stdout failing to flush on program exit should
trump whatever main returns.  The application simply may not care.

On the other hand, if stdout is invalid, and any output is done, writeln could
fail itself at any time.  If this is not expected, the effect is the same.

This can be opt-out also:

int main()
{
   ....
   try { fflush(NULL); } catch {}
   return 0;
}

So I'm OK with this.

I still think it's worth checking on first write whether the file descriptor is
valid (this only needs to be done for File instances opened with an existing
FILE * or file descriptor).  The advantage here is that the error occurs at
first use, not at some time later (possibly at program end!).  If the user is
simply using an invalid file descriptor, I'd rather see the exception at use,
not on program exit.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to