On Sep 26, 2017, at 1:05 PM, Simon Slavin <slav...@bigfraud.org> wrote:

> On 26 Sep 2017, at 8:47pm, Guy Harris <g...@alum.mit.edu> wrote:
> 
>> On Sep 26, 2017, at 8:22 AM, Jens Alfke <j...@mooseyard.com> wrote:
>> 
>>> The basic error code is SQLITE_IOERR, which just means "Some kind of disk 
>>> I/O error occurred” according to the comment. Which is true in this case; 
>>> an I/O operation returned an error.
>> 
>> But the *disk* didn't - the *operating system* did, so if SQLITE_IOERR 
>> really means "Some kind of disk I/O error occurred", it's *not* the right 
>> error to return for a *permission* error.
> 
> Those error codes were devised in a day when OS error codes were more simple.

EDQUOT was introduced in 1982, with 4.2BSD; when was SQLITE_IOERR devised?

> Also please note that those error codes are addressed to programmers.  Your 
> users should never see the text explanation of the number.  Because your 
> users wouldn’t know what to do about them.

A user wouldn't know what to do with "you've exceeded your stored data quota"?  
If so, your site has failed to explain to the users that they've been given a 
quota, limiting the amount of space on the server that they can use, and that 
if they exceed their quota, they either need to delete stuff they no longer 
need, move stuff they might *someday* need but don't need *now* to some 
archival medium, or ask their system administrator to increase their quota?

> At most the user can be shown the number returned to they can quote it in a 
> support call.

The *number* might annoy the support staff; right off the top of your head, 
what's the error number for "file system quota exceeded" or "I/O error"?  (No 
cheating by looking it up in a man page or include file!)

And, yes, there needs to be *some* way to get the underlying problem reported 
to somebody in a position to do something about it - where "the underlying 
problem" includes "what did the OS say?" as much as it includes "what SQLite 
operation got the error?".
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to