Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnknownProtocolError = 0 // unknown error InvalidData = 1 NegativeSize = 2 SizeLimit = 3 BadVersion = 4 NotImplemented = 5 DepthLimit = 6 )
0-6 corresponding with thrift protocol_exception
Variables ¶
View Source
var InvalidDataLength = NewProtocolErrorWithType(InvalidData, "Invalid data length")
InvalidDataLength indicates the data length is invalid.
Functions ¶
func IsProtocolError ¶
IsProtocolError to assert if the err is ProtocolError which has TypeId() func
func NewProtocolError ¶
NewProtocolError creates a new ProtocolError wrapping the given error.
func NewProtocolErrorWithErrMsg ¶
NewProtocolErrorWithErrMsg to build protocolException with rawErr and errMsg
func NewProtocolErrorWithMsg ¶
NewProtocolErrorWithMsg to build protocolException with errMsg
Types ¶
type ProtocolError ¶
ProtocolError indicates an protocol error has occurred.
func NewProtocolErrorWithType ¶
func NewProtocolErrorWithType(errType int, errMsg string) ProtocolError
NewProtocolErrorWithType to build protocolException with errType and errMsg
Click to show internal directories.
Click to hide internal directories.