Documentation
¶
Overview ¶
Package errl provides error handling utilities including location tracking and severity levels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorWithLocation ¶
type ErrorWithLocation struct {
// contains filtered or unexported fields
}
func Error ¶
func Error(err error) *ErrorWithLocation
func Errorf ¶
func Errorf(format string, a ...any) *ErrorWithLocation
func (*ErrorWithLocation) Error ¶
func (e *ErrorWithLocation) Error() string
Error returns the string including location and error
func (*ErrorWithLocation) Naked ¶
func (e *ErrorWithLocation) Naked() error
Naked returns the error without location info, possibly to use in a logging system which already includes location info
func (*ErrorWithLocation) Unwrap ¶
func (e *ErrorWithLocation) Unwrap() error
type SeverityLevel ¶
type SeverityLevel int
const ( DebugM SeverityLevel = iota InfoM WarnM ErrorM )
func (SeverityLevel) String ¶
func (s SeverityLevel) String() string
type ValidationMessage ¶
type ValidationMessage struct {
Severity SeverityLevel
Message string
}
type ValidationMessages ¶
type ValidationMessages []ValidationMessage
func (ValidationMessages) Add ¶
func (m ValidationMessages) Add(severity SeverityLevel, message string)
func (ValidationMessages) Addf ¶
func (m ValidationMessages) Addf(severity SeverityLevel, format string, args ...any)
func (ValidationMessages) String ¶
func (m ValidationMessages) String() string
Click to show internal directories.
Click to hide internal directories.