moerr

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 0 is OK.
	SUCCESS = iota
	INFO
	WARN

	// Group 1: Internal errors
	ERROR_START = 1000 + iota
	INTERNAL_ERROR
	NYI

	// Group 2: numeric
	DIVIVISION_BY_ZERO = 2000 + iota
	OUT_OF_RANGE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int32
	Message string
}

func NewError

func NewError(code int32, msg string) *Error

func NewInfo

func NewInfo(msg string) *Error

func NewInternalError

func NewInternalError(msg string, args ...interface{}) *Error

func NewPanicError

func NewPanicError(v interface{}) *Error

Convert a runtime panic to internal error.

func NewWarn

func NewWarn(msg string) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Ok

func (e *Error) Ok() bool

Jump to

Keyboard shortcuts

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