summaryrefslogtreecommitdiffstats
path: root/src/vtab_module.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vtab_module.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vtab_module.cc b/src/vtab_module.cc
index 043401a..31597c7 100644
--- a/src/vtab_module.cc
+++ b/src/vtab_module.cc
@@ -46,6 +46,13 @@ to_sqlite(sqlite3_context* ctx, const lnav::console::user_message& um)
sqlite3_result_error(ctx, errmsg.c_str(), errmsg.size());
}
+void
+set_vtable_errmsg(sqlite3_vtab* vtab, const lnav::console::user_message& um)
+{
+ vtab->zErrMsg = sqlite3_mprintf(
+ "%s%s", sqlitepp::ERROR_PREFIX, lnav::to_json(um).c_str());
+}
+
lnav::console::user_message
sqlite3_error_to_user_message(sqlite3* db)
{