Documentation ¶
Overview ¶
Package errors defines all exceptions happened in dfget's runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidValue represents the value is invalid. ErrInvalidValue = &DFGetError{codeInvalidValue, "invalid value"} // ErrNotInitialized represents the object is not initialized. ErrNotInitialized = &DFGetError{codeNotInitialized, "not initialized"} // ErrConvertFailed represents failed to convert. ErrConvertFailed = &DFGetError{codeConvertFailed, "convert failed"} // ErrRangeNotSatisfiable represents the length of file is insufficient. ErrRangeNotSatisfiable = &DFGetError{codeRangeNotSatisfiable, "range not satisfiable"} )
Functions ¶
func IsConvertFailed ¶
IsConvertFailed check the error is a conversion error or not.
func IsInvalidValue ¶
IsInvalidValue check the error is the value is invalid or not.
func IsNotInitialized ¶
IsNotInitialized check the error is the object is not initialized or not.
func IsRangeNotSatisfiable ¶
IsRangeNotSatisfiable check the error is a range not exist error or not.
Types ¶
type DFGetError ¶
DFGetError represents a error created by dfget.
func Newf ¶
func Newf(code int, format string, a ...interface{}) *DFGetError
Newf function creates a DFGetError with a message according to a format specifier.
func (*DFGetError) Error ¶
func (e *DFGetError) Error() string
Click to show internal directories.
Click to hide internal directories.