[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 17:04:33 PDT 2014


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

--- Comment #11 from bearophile_hugs at eml.cc ---
(In reply to Walter Bright from comment #9)

> I doubt I'd have trouble locating a 'throw' statement in a 50 line program.
> I don't believe you would, either.

Often there is no throw statement in the user code. See my answer in the
newsgroup.


> Use asserts for that. Asserts are designed for that, and
> are pretty good at it.

Have you seen asserts used to pre-test I/O actions in D script-like programs?
I've never seen them in the wild. Large programs catch exceptions and offer
meaningful error messages, windows, etc. And script-like programs just show the
exception and stack trace.

--


More information about the Digitalmars-d-bugs mailing list