Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Detail ¶
type Detail struct {
// contains filtered or unexported fields
}
Detail error contains a message, stack traces and an inner error. Usually, it is used by other errors and should always be created by `Make` or `New`.
func Make ¶
Make detail error. It is used to create other errors with stack trace and an inner error.
func (*Detail) FormatError ¶
FormatError formats this error with stack trace and inner errors.
type Flag ¶
type Flag func(*Detail)
Flag is used to add optional parameter to `detail.New(...)` By using those flags, we could custom error while `New` error. See: https://stackoverflow.com/a/26326418
func FlagAlias ¶
FlagAlias set an alias (error value) to this error. We could use `errors.Is(err, alias)` to test it.
func FlagInner ¶
FlagInner adds an inner error to this error. All error messages will be joined with a ": " when outputting.