nerror

package
v0.0.0-...-470470c Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundProcess        = ProcessError{"Can't not find the process by name"}
	ErrTooManySameNameProcess = ProcessError{"Too many processes with the same name"}
)

Process

View Source
var (
	ErrProcessPidMustNotNil = CmdError{"Because there are multiple processes with the same name, the PID is not allowed to be null"}
)

Cmd

Functions

func Call

func Call(fn func() error)

Call executes a function and checks the returned err.

func Log

func Log(err error)

Log logs the error if it is not nil.

func MustNil

func MustNil(err error, closeFuns ...func())

MustNil cleans up and fatals if err is not nil.

Types

type CmdError

type CmdError struct {
	Message string
}

func (CmdError) Error

func (e CmdError) Error() string

type ProcessError

type ProcessError struct {
	Message string
}

func (ProcessError) Error

func (e ProcessError) Error() string

Jump to

Keyboard shortcuts

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