Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllSeverities = [...]Severity{ SeverityWarning, SeverityError, SeverityCritical, }
Functions ¶
func SetDefaultErrsKind ¶
func SetDefaultErrsKind(kind Kind) cu.PartialContextFn
func SetDefaultErrsSeverity ¶
func SetDefaultErrsSeverity(severity Severity) cu.PartialContextFn
func WithFrames ¶
func WithFrames(b bool)
Types ¶
type Error ¶
type Frame ¶
type Frame struct { // Func contains a function name. Func string // Line contains a line number. Line int // Path contains a file path. Path string }
Frame is a single step in stack trace.
type Kind ¶
type Kind uint32
const ( KindOther Kind = iota // Unclassified error. This value is not printed in the error message. KindTransient // Transient error todo: use prev Error values KindInterrupted // Interrupted ( some kind of inconsistency ) KindInvalidValue // Invalid value for this type of item. KindIO // External I/O error such as network failure. KindServer // Http server error KindRouter // Router error KindStore // Any kind of store failures KindTokenizer // Any kind of tokenizer failures KindInternal // Internal error (for current errs pipeline impl this kind should be last in this list so that len(Kinds) = int(errs.KindInternal)) )
todo: make kind values as flags so that masks can be used to classify compound errors const KindOther Kind = 1 << (32 - 1 - iota)
func GetDefaultErrsKind ¶
Click to show internal directories.
Click to hide internal directories.