At 09:00 AM 2/10/2006, [EMAIL PROTECTED] wrote: >"Drew, Stephen" <[EMAIL PROTECTED]> wrote: >> Hello, >> >> In sqlite3OsWrite function (in os_win.c) the following code exists: >> >> while( amt>0 && (rc = WriteFile(id->h, pBuf, amt, &wrote, 0))!=0 && >> wrote>0 ){ >> >> amt -= wrote; >> >> pBuf = &((char*)pBuf)[wrote]; >> >> } >> >> if( !rc || amt>(int)wrote ){ >> >> return SQLITE_FULL; >> >> } >> >> Is this really a valid occasion to return SQLITE_FULL? > >What error code would you suggest as an alternative?
IMO the error code is fine, but there should be an auxiliary API that provides all available information (file name, windows error code, windows error description, current file size, ...), if only to facilitate the "duh" reaction when the user realizes what's really wrong.