Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
Example ¶
var err error x, y := 1, 2 if x != y { err = New(APPERRMET001, "something went wrong") } fmt.Println(err)
Output: [APPERRMET001]: something went wrong
func NewWithError ¶
Types ¶
type Error ¶
type Error struct { // Kind is the class of error, such as permission failure, or "Other" if its // class is unknown or irrelevant. Kind Kind // The underlying error that triggered this one, if any. Err error }
Error is the type that implements the error interface.
type Kind ¶
type Kind uint8
Kind defines the kind of error this is.
const ( GENERR001 Kind = iota // The Message Body is not in the expected format, for example mandatory fields are missing. GENERR002 // The provided messageType is not supported. GENERR003 // The expiration date of the Message had passed at the point at which delivery was attempted. GENERR004 // Invalid, missing or corrupt headers were detected on the Message. GENERR005 // Maximum number of connection retries exceeded when attempting to send the Message. GENERR006 // An error occurred interacting with the underlying system. GENERR007 // Malformed JSON was detected in the Message Body. GENERR008 // An attempt to roll back a transaction failed. GENERR009 // An unexpected or unknown error occurred. GENERR010 // Maximum number of Message resend retries exceeded. // Metadata Error Codes APPERRMET001 // Received a Metadata UPDATE with a datasetUUID that does not exist. APPERRMET002 // Received a Metadata DELETE with a datasetUUID that does not exist. APPERRMET003 // Received a Metadata READ with a datasetUUID that does not exist. APPERRMET004 // Received an invalid checksum for a file provided within the payload. )
Kinds of errors.
Click to show internal directories.
Click to hide internal directories.