Skip to content

Commit 13ab09a

Browse files
committed
Always provide an explicit case in a switch
Fixes #155.
1 parent b6a1321 commit 13ab09a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hdr/sqlite_modern_cpp/errors.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ namespace sqlite {
4545
#define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \
4646
case SQLITE_ ## NAME: switch(error_code) { \
4747
derived \
48-
default: throw name(error_code, sql); \
48+
case SQLITE_ ## NAME: \
49+
default: throw name(error_code, sql); \
4950
}
5051
#define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \
5152
case SQLITE_ ## BASE ## _ ## SUB: throw base ## _ ## sub(error_code, sql);

0 commit comments

Comments
 (0)