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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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