error

package
v0.0.0-...-31f5ead Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT 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 {
	ID      string     `json:"id" msgpack:"id"`
	Code    string     `json:"code" msgpack:"code"`
	Message string     `json:"message" msgpack:"message"`
	LOC     LineOfCode `json:"LOC" msgpack:"-"`
}

Error object

func New

func New(code string) *Error

New error object

func (Error) Error

func (e Error) Error() string

Error returns the error message

func (*Error) SetLineOfCode

func (e *Error) SetLineOfCode(loc LineOfCode) *Error

func (*Error) SetMessage

func (e *Error) SetMessage(msg string) *Error

SetMessage for the error

type LineOfCode

type LineOfCode struct {
	File string
	Line int
}

func GenerateLOC

func GenerateLOC(depth int) LineOfCode

Jump to

Keyboard shortcuts

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