Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelAllErrorCode ¶
func DelAllErrorCode()
DelAllErrorCode Clean the complete list of couple code - error
func DelErrorCode ¶
func DelErrorCode(code string)
DelErrorCode Remove an error with code from the register list
func SetErrorCode ¶
SetErrorCode Register a new error with code and an error string as ErrorType
func SetErrorCodeString ¶
func SetErrorCodeString(code, err string)
SetErrorCodeString Register a new error with code and an error string as string
Types ¶
type ErrorCode ¶
type ErrorCode interface { Error() error ErrorFull() error String() string StringFull() string Code() string Trace() runtime.Frame }
func GetErrorCode ¶
GetErrorCode return an ErrorCode interface mapped to code given in parameters. If the code is not found an 'ERR_UNKNOWN' will be used instead of the awaiting error If an origin error is given in params, this origin error will be used in the reference of generated error or string
func GetTraceErrorCode ¶ added in v1.0.2
GetTraceErrorCode return an ErrorCode interface mapped to given params code. If the code is not found an 'ERR_UNKNOWN' will be used instead of the awaiting error If an origin error is given in params, this origin error will be used in the reference of generated error or string This function add a trace of error generated