Documentation ¶
Index ¶
- func CheckErrorWrapping(t *testing.T, comment string, predicate func(error) bool, ...)
- func CheckOpaqueErrorWrapping(t *testing.T, comment string, predicate func(error) bool, ...)
- func IsFatal(err error) bool
- func IsNonShardableError(err error) bool
- func IsRetriablePartUploadError(err error) bool
- func IsTableUploadError(err error) bool
- func NewFatalError(err error) error
- func NewNonShardableError(err error) error
- func NewTableUploadError(err error) error
- type FatalError
- type NonShardableError
- type RetriablePartUploadError
- type TableUploadError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErrorWrapping ¶
func CheckErrorWrapping(t *testing.T, comment string, predicate func(error) bool, newError func(error) error)
CheckErrorWrapping checks that your custom error wrapper will not be damaged by other wrappers and vice vera. Use this function to run sub-test for your custom errors like this:
CheckErrorWrapping(t, "default creation", IsFatal, NewFatalError)
Parameters:
comment: comment for your sub-test isOpaque: if true, error removes type information about underlying error or does not using underlying error at all predicate: function determines is some error matches your error, e.g. IsFatal(err) newError: error constructor (wrapper), at least check default error constructor
func CheckOpaqueErrorWrapping ¶
func CheckOpaqueErrorWrapping(t *testing.T, comment string, predicate func(error) bool, newError func(error) error)
CheckOpaqueErrorWrapping is the same as CheckErrorWrapping, but for opaque errors can be used for checking new errors as well
func IsNonShardableError ¶
func IsTableUploadError ¶
func NewFatalError ¶
func NewNonShardableError ¶
func NewTableUploadError ¶
Types ¶
type FatalError ¶
type FatalError interface { error IsFatal() }
FatalError denotes an error which must stop the transfer completely, forbidding to restart it automatically
type NonShardableError ¶
type NonShardableError interface { error IsNonShardableError() }
type RetriablePartUploadError ¶
type RetriablePartUploadError struct {
// contains filtered or unexported fields
}
func NewRetriablePartUploadError ¶
func NewRetriablePartUploadError(err error) *RetriablePartUploadError
func (*RetriablePartUploadError) Is ¶
func (e *RetriablePartUploadError) Is(err error) bool
func (*RetriablePartUploadError) Unwrap ¶
func (e *RetriablePartUploadError) Unwrap() error
type TableUploadError ¶
type TableUploadError struct {
// contains filtered or unexported fields
}
func (TableUploadError) Is ¶
func (p TableUploadError) Is(err error) bool
func (TableUploadError) Unwrap ¶
func (p TableUploadError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.