Documentation ¶
Index ¶
- Variables
- func Client(reason string, http_code int)
- func ErrInTime(dur time.Duration, f func()) (err error)
- func LogError(err error)
- func LogErrorWithStack(err error)
- func LogUserErrorWithStack(err error)
- func PanicIfError(err error)
- func PanicToError(f func()) (err error)
- func PanicToErrorAndLog(f func()) (err error)
- type PanicErr
Constants ¶
This section is empty.
Variables ¶
View Source
var PrintStack = debug.PrintStack
Functions ¶
func LogErrorWithStack ¶
func LogErrorWithStack(err error)
func LogUserErrorWithStack ¶
func LogUserErrorWithStack(err error)
func PanicToError ¶
func PanicToError(f func()) (err error)
把panic转换成err返回, 没有panic时,返回nil panic(nil)会导致返回nil(没有错误)(这个目前没有找到靠谱的方法解决)
func PanicToErrorAndLog ¶
func PanicToErrorAndLog(f func()) (err error)
Types ¶
Click to show internal directories.
Click to hide internal directories.