Next | Program Repair Shop | 80 |
This error message is no good:
if (-e $dst) { die "Can't continue because a file has target's dir name\n" unless -d _; } ...
Suppose the program dies in the middle and says
Can't continue because a file has target's dir name
Which file!?!?!
Even if you somehow understand this, it doesn't help.
Now you get to go groveling over the target directory looking for the bad file.
Error messages should describe the cause of the problem
if (-e $dst) { die "File $dst exists but is not a directory" unless -d _ } ...
Now it says
File c:/temp/perl-5.7.1/lib/CGI/eg/crash.cgi exists but is not a directory at xcopy.pl line 25
Next | Copyright © 2002 M. J. Dominus |