Documentation ¶
Index ¶
- Constants
- Variables
- func AsCommonsError(err error) *commons.Error
- func Cause(err error) error
- func Detail(err error) string
- func Error(code ErrorCode, message, detail string) error
- func ErrorInternal(code ErrorCode, message, detail string) error
- func HttpStatusCode(err error) int
- func Message(err error) string
- func Wrap(err error, code ErrorCode, message, detail string) error
- func WrapInternalError(err error, code ErrorCode, message, detail string) error
- type ErrorCode
- type ProxyError
Constants ¶
View Source
const ( Tcp110 string = "110" Tcp111 string = "111" Tcp113 string = "113" )
TCP socket errors
Variables ¶
Functions ¶
func AsCommonsError ¶
func AsCommonsError(err error) *commons.Error
func ErrorInternal ¶
Error constructs a new error
func HttpStatusCode ¶
HttpStatusCode returns the http status code which will be sent to client
Types ¶
type ErrorCode ¶
type ErrorCode int32
ErrorCode is data type of error codes for different kind of errors
const RuntimeException ErrorCode = -5
UnknownError is the unknown error
type ProxyError ¶
type ProxyError struct {
// contains filtered or unexported fields
}
ProxyError is the struct of recorder proxy error
func (*ProxyError) Cause ¶
func (e *ProxyError) Cause() error
func (*ProxyError) Code ¶
func (e *ProxyError) Code() ErrorCode
func (*ProxyError) Detail ¶
func (e *ProxyError) Detail() string
func (*ProxyError) Error ¶
func (e *ProxyError) Error() string
func (*ProxyError) HttpStatusCode ¶
func (e *ProxyError) HttpStatusCode() string
func (*ProxyError) Message ¶
func (e *ProxyError) Message() string
Click to show internal directories.
Click to hide internal directories.