Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppHandler ¶
type AppHandler struct {
Handler Handler
}
AppHandler contains some custom logic to handle an error.
func NewAppHandler ¶
func NewAppHandler(handler Handler) AppHandler
func (AppHandler) Handle ¶
func (h AppHandler) Handle(err error)
func (AppHandler) HandleContext ¶
func (h AppHandler) HandleContext(ctx context.Context, err error)
type ContextHandler ¶
type ContextHandler struct {
Handler Handler
}
ContextHandler always accepts a context.
func NewContextHandler ¶
func NewContextHandler(handler Handler) ContextHandler
func (ContextHandler) HandleContext ¶
func (h ContextHandler) HandleContext(ctx context.Context, err error)
type NopHandler ¶
type NopHandler struct{}
NopHandler ignores all errors.
func (NopHandler) Handle ¶
func (h NopHandler) Handle(err error)
func (NopHandler) HandleContext ¶
func (h NopHandler) HandleContext(ctx context.Context, err error)
type SlogHandler ¶
SlogHandler is a Handler that logs errors using slog.
func NewSlogHandler ¶
func NewSlogHandler(logger *slog.Logger) SlogHandler
func (SlogHandler) Handle ¶
func (h SlogHandler) Handle(err error)
func (SlogHandler) HandleContext ¶
func (h SlogHandler) HandleContext(ctx context.Context, err error)
Click to show internal directories.
Click to hide internal directories.