Misleading error messages

I spent a while re-downloading a large archive that a popular command-line extraction tool said had a data error. Before re-downloading, I tried extraction several times, and each time it stopped and left a similar-sized output file, so its claimed error seemed plausible. After determining that the re-downloaded file matched the original, I eventually found that the real error was that the destination disk was full. Programmers often can hardly deal with checking for errors at all, let alone differentiating between data corruption, a full disk, and insufficient memory, three conditions that require three very different actions on the part of the user to correct. I’ve used plenty of programs which totally ignore errors, acting like everything was fine even though it wasn’t. In this case, the programmer apparently was only able to deal with checking for errors during extraction, assuming that any errors must be due to a corrupt archive, hence the misleading explanation it gave; it would have been better for it to just say that some kind of error occurred, and quit. It’s pathetic, especially when the standard C library offers perror(), which handles printing a useful error message for you.



Leave a comment