[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:16:18 PDT 2012


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


--- Comment #4 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-10-29 13:16:14 PDT ---
I don't think for a second that there's anything special about isX functions
which make it so that they can't throw. It all depends on what they're doing.
If they can't throw, then they're marked with nothrow.

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.

-- 
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