CodedError is a transform-detected error that carries an explicit PostgreSQL SQLSTATE. conn_errors.go reads the code via the SQLState() method when sending the error to the client; errors without a code default to 42704.
| 4 | // SQLSTATE. conn_errors.go reads the code via the SQLState() method when sending the |
| 5 | // error to the client; errors without a code default to 42704. |
| 6 | type CodedError struct { |
| 7 | Code string |
| 8 | Message string |
| 9 | } |
| 10 | |
| 11 | func (e *CodedError) Error() string { return e.Message } |
| 12 | func (e *CodedError) SQLState() string { return e.Code } |
nothing calls this directly
no outgoing calls
no test coverage detected