e

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

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

Error throw by error

func ErrorMessage

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

ErrorMessage throw by message

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 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 (
	// IsInitial is error when first output
	IsInitial ErrorType = 10
	// IsCommit is error while try to commit
	IsCommit ErrorType = 20
	// IsPreCommit is error when setup to commit
	IsPreCommit ErrorType = 19
	// IsPostCommit is error when cleanup after commit completed
	IsPostCommit ErrorType = 21
	// IsBranch is error when branch management
	IsBranch ErrorType = 20
	// IsCheckout is error occurred when checkout code
	IsCheckout ErrorType = 30
	// IsChangelog is error when export changelog
	IsChangelog ErrorType = 40
	// IsUser is error cause by user
	IsUser ErrorType = 50
	// IsLibrary is error cause by external libraries
	IsLibrary ErrorType = 100
)

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