diff options
author | June McEnroe <june@causal.agency> | 2019-12-28 18:53:09 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-28 18:53:09 -0500 |
commit | d2b7431680cd96758915751854b627cfaca88062 (patch) | |
tree | 3e6deb226df8cd707a2c235dcdb8b247364d64d8 | |
parent | Don't insert self-messages (diff) | |
download | litterbox-d2b7431680cd96758915751854b627cfaca88062.tar.gz litterbox-d2b7431680cd96758915751854b627cfaca88062.zip |
Send fts5 errors in response to queries
Diffstat (limited to '')
-rw-r--r-- | litterbox.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/litterbox.c b/litterbox.c index 9cc1bb5..f02948e 100644 --- a/litterbox.c +++ b/litterbox.c @@ -283,7 +283,14 @@ static void querySearch(struct Message *msg) { ); } } - if (result != SQLITE_DONE) warnx("%s", sqlite3_errmsg(db)); + if (result != SQLITE_DONE) { + const char *errmsg = sqlite3_errmsg(db); + if (!strncmp(errmsg, "fts5:", 5)) { + format("NOTICE %s :%s\r\n", msg->nick, errmsg); + } else { + warnx("%s", sqlite3_errmsg(db)); + } + } sqlite3_reset(stmt); } |