errorshlp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errorshlp contains Newity functions for errors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapWithDetails

func WrapWithDetails(err error, errType ErrType, componentName ComponentName) error

WrapWithDetails wraps error with details

Types

type ComponentName

type ComponentName string

ComponentName is a type for component name

type DetailsError

type DetailsError struct {
	Type      ErrType
	Component ComponentName
	// contains filtered or unexported fields
}

DetailsError types

func ExtractDetailsError

func ExtractDetailsError(err error) (*DetailsError, bool)

ExtractDetailsError extracts DetailsError from error

func (*DetailsError) Cause

func (de *DetailsError) Cause() error

Cause returns the underlying error

func (*DetailsError) Error

func (de *DetailsError) Error() string

Error types

func (*DetailsError) Format

func (de *DetailsError) Format(s fmt.State, verb rune)

Format formats the error

func (*DetailsError) Unwrap

func (de *DetailsError) Unwrap() error

Unwrap returns the underlying error

type ErrType

type ErrType string

ErrType is a type for error type

Jump to

Keyboard shortcuts

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