errorhandling

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

package designed to hold common functions that are related to handling errors encountered during execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCritical

func HandleCritical(err error)

function designed to compress the normal error check down to one line and make handling critical errors take less space. this will print out the error and exit the program with a return code of 1 if the error passed into it is not nil.

Types

type NotFoundError added in v0.0.20

type NotFoundError struct{}

struct defining a custom NotFound error. this can be used when searching for an object fails.

func (*NotFoundError) Error added in v0.0.20

func (nf *NotFoundError) Error() string

function defining the string message that will be attached to a NotFound error.

func (*NotFoundError) Is added in v0.0.20

func (nf *NotFoundError) Is(err error) bool

function designed to determine if a given error is of the NotFoundError type.

Jump to

Keyboard shortcuts

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