errl

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL