On Wednesday, 27 September, 2017 10:39, Guy Harris <g...@alum.mit.edu> wrote:
>On Sep 27, 2017, at 6:58 AM, Keith Medcalf <kmedc...@dessus.com> wrote: >> Well, the terminology is correct. These *ARE* I/O Errors. The >> system attempted I/O. It failed. Hence the term I/O Error. > Just don't call it a "disk I/O error". Well, maybe. However the I/O that had the error was associated with a disk operation (as opposed to a "Video I/O Error", or a "Cardpunch I/O Error", "Printer I/O Error", etc.). >> It is irrelevant whether the error was caused because the heads on >> the tape drive need cleaning, access was denied to spool storage, the >> disk was full, someone yanked the cable out of the disk drive, or the >> card reader got jammed up. >I.e., SQLITE_IOERR is equivalent to -1 as a return from various UN*X >system calls, so that, when a program sees it, it needs to get >further error information, such as an errno value, to deal with the >error and, if necessary, to report it. Yes. An I/O operation of some sort was attempted. That I/O operation involved some sort of "disk" access. That operation failed with an error. >So it *is* relevant to what to do next. Well, in the same sort of way as the message from attempting to send Snail mail "Mail Undeliverable" is relevant to what to do next. You know that the error was related to the delivery of the postal item just as the "Disk I/O Error" indicates that an I/O operation that involved a disk operation failed with an error. In both cases you need to query for the underlying error condition in order to determine what to do. So in that sense it is relevant to what to do next -- you need to query for more particulars. This is opposed to say a "Syntax Error" in which it is pretty clear that the error is a mis-formed statement. In both cases only the underlying error code from the "Operating System" can assist you in what to do next. In the case of Snail Mail, the underlying error code of "No Such Address" entails a completely different response than "Delivery Vehicle Exploded and Your Message Burned Up en-route to Delivery" or "Delivery Location Not Found -- Destroyed by Hurricaine". Similarly the return code from the OS in the case of an I/O is relevant to determining the next step in recovery -- "Device Not Found" is different from "Filesystem is Corrupt" which is different from "Access is Denied" which is different from "General Failure Reading ..." (who is General Failure and why is he trying to read my files ... I should hope that such attempts fail :) ) _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users