e

package
v2.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Show

func Show(t *manager.Throwable)

Show is util method for show error message

func ShowAndExit

func ShowAndExit(t *manager.Throwable)

ShowAndExit is util method for show error message and instant exit program

func Throw

func Throw(t ErrorType, message string) *manager.Throwable

Throw throw by message

func ThrowE

func ThrowE(t ErrorType, e error) *manager.Throwable

ThrowE throw by error

func Update

func Update(throw *manager.Throwable, t ErrorType) *manager.Throwable

Update will update throwable as error type

Types

type ErrorType

type ErrorType int

ErrorType for throw

const (
	// InitialError is error when first output
	InitialError ErrorType = 10
	// CommitError is error while try to commit
	CommitError ErrorType = 11
	// PreCommitError is error when setup to commit
	PreCommitError ErrorType = 12
	// BranchError is error when branch management
	BranchError ErrorType = 20
	// ChangelogError is error when export changelog
	ChangelogError ErrorType = 40
	// CheckoutErrror is error occurred when checkout code
	CheckoutErrror ErrorType = 30
	// UserError is error cause by user
	UserError ErrorType = 50
)

func (ErrorType) Code

func (e ErrorType) Code() int

Code is getter error code

Jump to

Keyboard shortcuts

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