[Issue 13543] std.file.FileException has useless __FILE__ and __LINE__ arguments tacked on
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat Sep 27 15:40:09 PDT 2014
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13543
--- Comment #6 from bearophile_hugs at eml.cc ---
(In reply to Walter Bright from comment #4)
> This is a serious misuse of Exceptions.
> 
> What do your customers think when your apps are showing them file/line
> pointing to your internal source code when a file doesn't exist?
It's a basic information, better than no information at all. If my app tells me
a file is missing then maybe I can find it. But see below.
> I've never even heard of an app that would assault users with such "error"
> messages, except for D apps.
> 
> 
> The construct to debug code is "assert", not "throw".
Adding the line number of the user code that has caused the IO exception is
handy to fix little script-like D programs.
A IO exception is meant to be caught by your large serious programs, it's never
meant to be shown to users.
--
    
    
More information about the Digitalmars-d-bugs
mailing list