Documentation ¶
Index ¶
- func Code(err error) codes.Code
- func DocURL(err error) string
- func New(code codes.Code, msg ...interface{}) error
- func Newf(code codes.Code, fmtStr string, args ...interface{}) error
- func Wrap(err error, code codes.Code, msg ...interface{}) error
- func Wrapf(err error, code codes.Code, format string, a ...interface{}) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns the error code for the given error. If the error is not a flux.Error, this will return Unknown for the code. If the error is a flux.Error and its code is Inherit, then this will return the wrapped error's code.
Types ¶
type Error ¶
type Error struct { // Code is the code of the error as defined in the codes package. // This describes the type and category of the error. It is required. Code codes.Code // Msg contains a human-readable description and additional information // about the error itself. This is optional. Msg string // DocURL contains a link to documentation that is related to explaining // details and/or solutions to this error message. DocURL string // Err contains the error that was the cause of this error. // This is optional. Err error }
Error is the error struct of flux.
Click to show internal directories.
Click to hide internal directories.