errutil

package
v2.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBreak = pacherr.ErrBreak

Functions

func IsAlreadyExistError

func IsAlreadyExistError(err error) bool

IsAlreadyExistError returns true if err is due to trying to create a resource that already exists. It uses simple string matching, it's not terribly smart.

func IsDatabaseDisconnect added in v2.6.6

func IsDatabaseDisconnect(err error) bool

IsDatabseDisconnect returns true if the error represents a database disconnect

func IsInvalidPathError

func IsInvalidPathError(err error) bool

IsInvalidPathError returns true if the err is due to an invalid path

func IsNetRetryable

func IsNetRetryable(err error) bool

IsNetRetryable returns true if the error is a temporary network error.

func IsNotADirectoryError

func IsNotADirectoryError(err error) bool

IsNotADirectoryError returns true if the err is due to an attempt to put a file on path that has a non-directory parent. These errors come from the hashtree package; while it provides an error code, we can't check against that because we'd then have to import hashtree, and hashtree imports errutil, leading to circular imports.

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError returns true if err is due to a resource not being found. It uses simple string matching, it's not terribly smart.

func IsWriteToOutputBranchError

func IsWriteToOutputBranchError(err error) bool

IsWriteToOutputBranchError returns true if the err is due to an attempt to write to an output repo/branch

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL