Skip to content

Store error message also for basic return codes. #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions hdr/sqlite_modern_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ namespace sqlite {

template<class T, bool Name = false>
struct index_binding_helper {
using Index = std::conditional_t<Name, const char *, int>;

index_binding_helper(const index_binding_helper &) = delete;
#if __cplusplus < 201703 || _MSVC_LANG <= 201703
//#if __cplusplus < 201703 || _MSVC_LANG // && _MSVC_LANG <= 201703
index_binding_helper(index_binding_helper &&) = default;
#endif
typename std::conditional<Name, const char *, int>::type index;
//#endif
index_binding_helper(Index index_, T value_) :
index(index_), value(value_) { }

Index index;
T value;
};

Expand Down
2 changes: 1 addition & 1 deletion hdr/sqlite_modern_cpp/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace sqlite {
case SQLITE_ ## NAME: switch(error_code) { \
derived \
case SQLITE_ ## NAME: \
default: throw name(error_code, sql); \
default: throw name(error_code, sql, errmsg); \
}

#if SQLITE_VERSION_NUMBER < 3010000
Expand Down