errs

package
v1.5.8-0...-fc52f2c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int
	Name    string
	Package string
	// contains filtered or unexported fields
}

Error implements the standard go error interface.

errors.New(code, format, params ...interface{})

Prints as:

[package] description: details

where details is fmt.Sprintf(self.format, self.params...)

func (Error) Error

func (self Error) Error() (message string)

func (Error) Log

func (self Error) Log(v glog.Verbose)

type Errors

type Errors struct {
	Errors  map[int]string
	Package string
}

Errors implements an error handler providing standardised errors for a package. Fields:

Errors:
 a map from error codes to description

Package:
 name of the package/component

func (*Errors) New

func (self *Errors) New(code int, format string, params ...interface{}) *Error

Jump to

Keyboard shortcuts

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