Description

Error provides a single type for errors that can happen during database operation. It is used to indicate several types of failures including errors with caller requests such as specifying invalid block regions or attempting to access data against closed database transactions, driver errors, errors retrieving data, and errors communicating with database servers.

The caller can use type assertions to determine if an error is an Error and access the ErrorCode field to ascertain the specific reason for the failure.

The ErrDriverSpecific error code will also have the Err field set with the underlying error. Depending on the backend driver, the Err field might be set to the underlying error for other error codes as well.

Error is referenced in 2 repositories

github.com/btcsuite/btcd

...