[Issue 8909] is{File, Dir, SymLink} mix return error code and exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 29 13:22:12 PDT 2012


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



--- Comment #5 from Dimitri Sabadie <dimitri.sabadie at gmail.com> 2012-10-29 13:22:10 PDT ---
(In reply to comment #4)
> And while the stat call may be an implementation detail, regardless of how
> isFile, isDir, or isSymlink are implemented, they rely on the fact that the
> file that they're given exists, so _of course_ there's going to be a serious
> problem if the file doesn't exist. Throwing is the correct behavior in that
> case.

This case should be test before a call to isFile IMHO. Here isFile has a too
high responsibility.

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


More information about the Digitalmars-d-bugs mailing list