Skip to content

Commit 1389a98

Browse files
author
Edward Rosten
committed
Replace current_exception with uncaught_exception as the former is active in a catch block. This prevents running db queries in a catch block as the library won't query when the stack is unwinding.
1 parent 9325249 commit 1389a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hdr/sqlite_modern_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class database_binder {
203203

204204
/* Will be executed if no >>op is found, but not if an exception
205205
is in mud flight */
206-
if (!execution_started && !std::current_exception()) {
206+
if (!execution_started && !std::uncaught_exception()) {
207207
int hresult;
208208

209209
while ((hresult = sqlite3_step(_stmt)) == SQLITE_ROW) { }

0 commit comments

Comments
 (0)