Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( INTERNAL_ERROR_MSG = "Internal error." INTERNAL_ERROR_CODE uint64 = 1 NETWORK_ERROR_MSG = "Network error." NETWORK_ERROR_CODE uint64 = 2 INTERNAL_ERROR = WrapWithCode(fmt.Errorf(INTERNAL_ERROR_MSG), INTERNAL_ERROR_CODE) NETWORK_ERROR = WrapWithCode(fmt.Errorf(NETWORK_ERROR_MSG), NETWORK_ERROR_CODE) )
Functions ¶
func ThrowInternal ¶ added in v0.0.11
func ThrowInternal(err error)
func ThrowWithCode ¶ added in v0.0.11
func ThrowWithCodeAndData ¶ added in v0.0.11
Types ¶
type ErrorInfo ¶
type ErrorInfo struct { Code uint64 `json:"code"` Data interface{} `json:"data"` Err error `json:"err"` }
func WrapWithAll ¶ added in v0.0.11
func WrapWithCode ¶ added in v0.0.11
func WrapWithErr ¶ added in v0.0.11
func WrapWithStr ¶ added in v0.0.11
Click to show internal directories.
Click to hide internal directories.