Documentation
¶
Overview ¶
Package perrors provides error handling for pgxcli.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrDetailed ¶
type ErrDetailed struct {
// contains filtered or unexported fields
}
ErrDetailed is an error with details, mainly used for logging.
func (ErrDetailed) Details ¶
func (e ErrDetailed) Details() iter.Seq2[string, any]
Details returns the details of an ErrDetailed as a sequence of key-value pairs.
func (ErrDetailed) Exit ¶
func (e ErrDetailed) Exit() int
Exit gets the exit code of an error, if available.
func (ErrDetailed) Messages ¶
func (e ErrDetailed) Messages() []string
Messages returns the messages of an ErrDetailed.
func (ErrDetailed) Output ¶
func (e ErrDetailed) Output() string
Output returns the output of an ErrDetailed.
type Option ¶
type Option func(*ErrDetailed)
Option changes things in an ErrDetailed.
func WithDetails ¶
WithDetails adds details to an ErrDetailed.
Details are key-value pairs, so the number of arguments should be even.
func WithMessage ¶
WithMessage adds a message to an ErrDetailed.
func WithOutput ¶
WithOutput sets the output in an ErrDetailed.
Click to show internal directories.
Click to hide internal directories.