1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add the SQLITE_NOTADB return code for cases when you try to open a file

that does not even remotely resemble an SQLite database file. (CVS 1233)

FossilOrigin-Name: 0c77cee70f078152969933c1d340cea1c86286b0
This commit is contained in:
drh
2004-02-12 19:01:04 +00:00
parent 4d189ca48f
commit c602f9ae01
6 changed files with 18 additions and 16 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.149 2004/02/12 18:46:39 drh Exp $
** $Id: main.c,v 1.150 2004/02/12 19:01:05 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -770,6 +770,7 @@ const char *sqlite_error_string(int rc){
case SQLITE_AUTH: z = "authorization denied"; break;
case SQLITE_FORMAT: z = "auxiliary database format error"; break;
case SQLITE_RANGE: z = "bind index out of range"; break;
case SQLITE_NOTADB: z = "file is encrypted or is not a database";break;
default: z = "unknown error"; break;
}
return z;