Skip to main content

classify

Function classify 

Source
pub async fn classify(conn: &Connection, err: Error, op: WriteOp<'_>) -> DbError
Expand description

Turn an engine error into the typed error §7 specifies, where one applies.

Takes a connection because RecordedAtRegression reports the value it clashed with, and the trigger does not put it in the message. One extra query on an error path buys an error a caller can act on instead of one they have to reproduce by hand.