Documentation ¶
Overview ¶
Package errors is a drop-in replacement for Golang lib 'errors'.
Index ¶
- func Cause(err error) error
- func Combine(maybeError ...error) error
- func GetSeverity(err error) log.Severity
- type Error
- func (err *Error) AtDebug() *Error
- func (err *Error) AtError() *Error
- func (err *Error) AtInfo() *Error
- func (err *Error) AtWarning() *Error
- func (err *Error) Base(e error) *Error
- func (err *Error) Error() string
- func (err *Error) Inner() error
- func (err *Error) Severity() log.Severity
- func (err *Error) String() string
- func (err *Error) WithPathObj(obj interface{}) *Error
- func (err *Error) WriteToLog(opts ...ExportOption)
- type ExportOption
- type ExportOptionHolder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is an error object with underlying error.
func New ¶
func New(msg ...interface{}) *Error
New returns a new error object with message formed from given arguments.
func (*Error) AtWarning ¶
AtWarning sets the severity to warning.
func (*Error) String ¶
String returns the string representation of this error.
func (*Error) WriteToLog ¶
func (err *Error) WriteToLog(opts ...ExportOption)
WriteToLog writes current error into log.
type ExportOption ¶
type ExportOption func(*ExportOptionHolder)
Click to show internal directories.
Click to hide internal directories.