I have a C++ application that calls SQLite\'s (SQLite is in C) sqlite3_exec() which in turn can call my callback function implemented in C++. SQLite is compiled into a stati
There is already a protocol for the callback to abort the API call. From the docs:
If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() routine returns SQLITE_ABORT without invoking the callback again and without running any subsequent SQL statements.
I'd strongly recommend you use this instead of an exception.