Documentation ¶
Overview ¶
Package errortypes defines all exceptions happened in dragonfly.
Package errortypes defines all exceptions happened in supernode's runtime.
Index ¶
- Variables
- func IsAuthenticationRequired(err error) bool
- func IsCDNFail(err error) bool
- func IsCDNWait(err error) bool
- func IsConvertFailed(err error) bool
- func IsDataNotFound(err error) bool
- func IsEmptyValue(err error) bool
- func IsInvalidValue(err error) bool
- func IsNilError(err error) bool
- func IsNotInitialized(err error) bool
- func IsPeerContinue(err error) bool
- func IsPeerWait(err error) bool
- func IsRangeNotSatisfiable(err error) bool
- func IsSystemError(err error) bool
- func IsTaskIDDuplicate(err error) bool
- func IsURLNotReachable(err error) bool
- func IsUnknowError(err error) bool
- type DfError
- type ErrAssertFunc
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDataNotFound represents the data cannot be found. ErrDataNotFound = DfError{codeDataNotFound, "data not found"} // ErrEmptyValue represents the value is empty or nil. ErrEmptyValue = DfError{codeEmptyValue, "empty value"} // ErrInvalidValue represents the value is invalid. ErrInvalidValue = DfError{codeInvalidValue, "invalid value"} // ErrNotInitialized represents the object is not initialized. ErrNotInitialized = DfError{codeNotInitialized, "not initialized"} // ErrConvertFailed represents failed to convert. ErrConvertFailed = DfError{codeConvertFailed, "convert failed"} // ErrRangeNotSatisfiable represents the length of file is insufficient. ErrRangeNotSatisfiable = DfError{codeRangeNotSatisfiable, "range not satisfiable"} )
var ( // ErrSystemError represents the error is a system error. ErrSystemError = DfError{codeSystemError, "system error"} // ErrCDNFail represents the cdn status is fail. ErrCDNFail = DfError{codeCDNFail, "cdn status is fail"} // ErrCDNWait represents the cdn status is wait. ErrCDNWait = DfError{codeCDNWait, "cdn status is wait"} // ErrPeerWait represents the peer should wait. ErrPeerWait = DfError{codePeerWait, "peer should wait"} // ErrUnknownError represents the error should not happen // and the cause of that is unknown. ErrUnknownError = DfError{codeUnknownError, "unknown error"} // PeerContinue represents the peer should wait. PeerContinue = DfError{codePeerContinue, "peer continue"} // ErrURLNotReachable represents the url is a not reachable. ErrURLNotReachable = DfError{codeURLNotReachable, "url not reachable"} // ErrTaskIDDuplicate represents the task id is in conflict. ErrTaskIDDuplicate = DfError{codeTaskIDDuplicate, "taskId conflict"} // ErrAuthenticationRequired represents the authentication is required. ErrAuthenticationRequired = DfError{codeAuthenticationRequired, "authentication required"} )
Functions ¶
func IsAuthenticationRequired ¶
IsAuthenticationRequired checks the error is an AuthenticationRequired error or not.
func IsConvertFailed ¶
IsConvertFailed checks the error is a conversion error or not.
func IsDataNotFound ¶
IsDataNotFound checks the error is the data cannot be found.
func IsEmptyValue ¶
IsEmptyValue checks the error is the value is empty or nil.
func IsInvalidValue ¶
IsInvalidValue checks the error is the value is invalid or not.
func IsNotInitialized ¶
IsNotInitialized checks the error is the object is not initialized or not.
func IsPeerContinue ¶
IsPeerContinue checks the error is PeerContinue or not.
func IsRangeNotSatisfiable ¶
IsRangeNotSatisfiable checks the error is a range not exist error or not.
func IsSystemError ¶
IsSystemError checks the error is a system error or not.
func IsTaskIDDuplicate ¶
IsTaskIDDuplicate checks the error is a TaskIDDuplicate error or not.
func IsURLNotReachable ¶
IsURLNotReachable checks the error is a url not reachable or not.
func IsUnknowError ¶
IsUnknowError checks the error is UnknowError or not.
Types ¶
type DfError ¶
DfError represents a Dragonfly error.