Package errors implements errors that can be easily sent across the wire and reconstructed at the other end.
const ( // UnknownModule is the module name used when the module is unknown. UnknownModule = "unknown" // CodeNoError is the reserved "no error" code. CodeNoError = 0 )
Re-exports so this package can be used as a replacement for errors.
Code returns the module and code for the given error.
In case the error is not of the correct type, default values for an unknown error are returned.
FromCode reconstructs a previously registered error from module and code.
In case an error cannot be resolved, this method returns nil.