-
Notifications
You must be signed in to change notification settings - Fork 1
/
doc.go
21 lines (21 loc) · 917 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Package errors provides leightweight error handling and classification primitives.
//
// The package defines blazingly fast classification system.
// A class is composed of the major, minor and index subclassifications.
// Each subclassifaction has different bitwise length with total of 32 bits.
// Thus a Class is a wrapper over uint32.
// A major is composed of 8, minor 10 and index of 14 bits.
//
// Example:
// Class with decimal value of 44205263, in a binary form equals to
// 00000010101000101000010011001111 which decomposes into:
// 00000010 - major (8 bit)
// 1010001010 - minor (10 bit)
// 00010011001111 - index (14 bit)
//
// The class concept was inspired by the need of multiple errors
// with the same logic but different messages.
//
// The package provides simple error handling interfaces and functions.
// It allows to create simple and detailed classified errors.
package errors