Skip to content

Commit ba4f6b7

Browse files
authored
Merge pull request #180 from aminroosta/fix-errors-in-visual-studio
Fix errors.h in visual studio
2 parents 6613f7c + f1ae079 commit ba4f6b7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

hdr/sqlite_modern_cpp/errors.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ namespace sqlite {
4949
case SQLITE_ ## NAME: \
5050
default: throw name(error_code, sql); \
5151
}
52+
53+
#if SQLITE_VERSION_NUMBER < 3010000
54+
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
55+
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
56+
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
57+
#endif
58+
5259
#define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \
5360
case SQLITE_ ## BASE ## _ ## SUB: throw base ## _ ## sub(error_code, sql);
5461
#include "lists/error_codes.h"

hdr/sqlite_modern_cpp/lists/error_codes.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#if SQLITE_VERSION_NUMBER < 3010000
2-
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
3-
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
4-
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
5-
#endif
61
SQLITE_MODERN_CPP_ERROR_CODE(ERROR,error,)
72
SQLITE_MODERN_CPP_ERROR_CODE(INTERNAL,internal,)
83
SQLITE_MODERN_CPP_ERROR_CODE(PERM,perm,)

0 commit comments

Comments
 (0)