[Issue 13544] calls to std.file.FileException are idup-ing their string arguments

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Oct 5 10:31:47 PDT 2014


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

--- Comment #9 from Vladimir Panteleev <thecybershadow at gmail.com> ---
BTW, std.file.copy is not a very good example, because really it should be
fixed as to what exception message it's using. Right now it's doing:

        if (!result)
            throw new FileException(to.idup);

However, if the source file or path does not exist, this generates an entirely
misleading message. The exception message should contain both the "from" and
"to" parameters, because we can't know which path the problem occurred with.

Yes, in this case, this means more bloat. But it needs to be fixed.

--


More information about the Digitalmars-d-bugs mailing list