[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 14:46:20 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13543

--- Comment #3 from bearophile_hugs at eml.cc ---
(In reply to Walter Bright from comment #2)
> (In reply to bearophile_hugs from comment #1)
> > I guess a FileException should give the line number of the *user* code where
> > he/she has performed a failed file operation.
> 
> Once again, Exceptions are NOT for debugging user code.

I don't agree. If I open a file, and the opening fails, I'd like the exception
to tell me what damned line of my code has tried to open that file. Exceptions
are useful to debug user code.

--


More information about the Digitalmars-d-bugs mailing list