pub fn abort_kind(err: &Error) -> AbortKindExpand description
Recognise a schema guard’s RAISE(ABORT, …) by its message.
The only place in the crate that matches on engine error text. SQLite
reports a RAISE(ABORT) as a generic constraint failure carrying the
message, so the message is the only thing distinguishing “you violated the
single-open-interval rule” from “the disk is full” — but matching on it
scattered across call sites means an upstream wording change degrades an
unknown number of typed errors into opaque ones, silently. Concentrated here,
a change breaks one function and the tests that cover it.
The needles are the crate::schema::ddl constants spliced into the
triggers themselves, so guard and classifier cannot drift.