Crate sqlite_err_parser

Source
Expand description

Turn certain sqlite errors (received through rusqlite) into structured data.

§Caveat Emptor

This crate will parse the raw error strings generated by the underlying SQLite library. There are several potential pitfalls with this:

  • SQLite does not appear to provide any stability guarantees with regards to its error messages.
  • Compliation options may affect what error messages SQLite will generate.
  • SQLite libraries from third parties may have modified error messages.

There are more robust ways to solve the problem this crate attempts to solve – for instance using triggers.

Enums§

InterpretedError
A structured interpretation of certain rusqlite errors.

Functions§

deconstruct_error
Attempt to interpret a rusqlite::Error, and turn it into an InterpretedError.
interpret
Interpret an rusqlite::Error into a String.
register_interpreter
Register a closure that translates an InterpretedError into a String.