Catching errors from SQLite in Common Lisp -



Catching errors from SQLite in Common Lisp -

i'm using sqlite wrapper quicklisp, described here. notice that, example, execute-non-query, returns nothing, throw sqlite-errors. however, i'm not sure how handle them - far can tell, catch needs explicit tag, , i'm not sure how wrapper tags them.

basically, this:

(if (no-error (execute-non-query *db* query-string)) (do-happy-thing) (report-error))

how go doing this?

handler-case friend.

(handler-case (progn (execute-non-query *db* query-string) (do-happy-thing)) (sqlite-error (err) (report-error err))) ; err contains additional info

sqlite common-lisp sbcl quicklisp

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -