{"modulePath":"github.com/wailsapp/task/v3","version":"v3.40.1-patched3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\n## Constants\n\n```go\nconst (\n\tCodeOk      int = iota // Used when the program exits without errors\n\tCodeUnknown            // Used when no other exit code is appropriate\n)\n```\nGeneral exit codes\n\n```go\nconst (\n\tCodeTaskfileNotFound int = iota + 100\n\tCodeTaskfileAlreadyExists\n\tCodeTaskfileDecode\n\tCodeTaskfileFetchFailed\n\tCodeTaskfileNotTrusted\n\tCodeTaskfileNotSecure\n\tCodeTaskfileCacheNotFound\n\tCodeTaskfileVersionCheckError\n\tCodeTaskfileNetworkTimeout\n\tCodeTaskfileInvalid\n\tCodeTaskfileCycle\n)\n```\nTaskfile related exit codes\n\n```go\nconst (\n\tCodeTaskNotFound int = iota + 200\n\tCodeTaskRunError\n\tCodeTaskInternal\n\tCodeTaskNameConflict\n\tCodeTaskCalledTooManyTimes\n\tCodeTaskCancelled\n\tCodeTaskMissingRequiredVars\n\tCodeTaskNotAllowedVars\n)\n```\nTask related exit codes\n\n## Functions\n\n```go\nfunc As(err error, target any) bool\n```\nAs wraps the standard errors.As function so that we don't need to alias that package.\n\n```go\nfunc Is(err, target error) bool\n```\nIs wraps the standard errors.Is function so that we don't need to alias that package.\n\n```go\nfunc New(text string) error\n```\nNew returns an error that formats as the given text. Each call to New returns a distinct error value even if the text is identical. This wraps the standard errors.New function so that we don't need to alias that package.\n\n```go\nfunc Unwrap(err error) error\n```\nUnwrap wraps the standard errors.Unwrap function so that we don't need to alias that package.\n\n## Types\n\n```go\ntype NotAllowedVar struct {\n\tValue string\n\tEnum  []string\n\tName  string\n}\n```\n\n```go\ntype TaskCalledTooManyTimesError struct {\n\tTaskName        string\n\tMaximumTaskCall int\n}\n```\nTaskCalledTooManyTimesError is returned when the maximum task call limit is exceeded. This is to prevent infinite loops and cyclic dependencies.\n\n```go\nfunc (err *TaskCalledTooManyTimesError) Code() int\n```\n\n```go\nfunc (err *TaskCalledTooManyTimesError) Error() string\n```\n\n```go\ntype TaskCancelledByUserError struct {\n\tTaskName string\n}\n```\nTaskCancelledByUserError is returned when the user does not accept an optional prompt to continue.\n\n```go\nfunc (err *TaskCancelledByUserError) Code() int\n```\n\n```go\nfunc (err *TaskCancelledByUserError) Error() string\n```\n\n```go\ntype TaskCancelledNoTerminalError struct {\n\tTaskName string\n}\n```\nTaskCancelledNoTerminalError is returned when trying to run a task with a prompt in a non-terminal environment.\n\n```go\nfunc (err *TaskCancelledNoTerminalError) Code() int\n```\n\n```go\nfunc (err *TaskCancelledNoTerminalError) Error() string\n```\n\n```go\ntype TaskError interface {\n\terror\n\tCode() int\n}\n```\nTaskError extends the standard error interface with a Code method. This code will be used as the exit code of the program which allows the user to distinguish between different types of errors.\n\n```go\ntype TaskInternalError struct {\n\tTaskName string\n}\n```\nTaskInternalError when the user attempts to invoke a task that is internal.\n\n```go\nfunc (err *TaskInternalError) Code() int\n```\n\n```go\nfunc (err *TaskInternalError) Error() string\n```\n\n```go\ntype TaskMissingRequiredVars struct {\n\tTaskName    string\n\tMissingVars []string\n}\n```\nTaskMissingRequiredVars is returned when a task is missing required variables.\n\n```go\nfunc (err *TaskMissingRequiredVars) Code() int\n```\n\n```go\nfunc (err *TaskMissingRequiredVars) Error() string\n```\n\n```go\ntype TaskNameConflictError struct {\n\tCall      string\n\tTaskNames []string\n}\n```\nTaskNameConflictError is returned when multiple tasks with a matching name or alias are found.\n\n```go\nfunc (err *TaskNameConflictError) Code() int\n```\n\n```go\nfunc (err *TaskNameConflictError) Error() string\n```\n\n```go\ntype TaskNameFlattenConflictError struct {\n\tTaskName string\n\tInclude  string\n}\n```\n\n```go\nfunc (err *TaskNameFlattenConflictError) Code() int\n```\n\n```go\nfunc (err *TaskNameFlattenConflictError) Error() string\n```\n\n```go\ntype TaskNotAllowedVars struct {\n\tTaskName       string\n\tNotAllowedVars []NotAllowedVar\n}\n```\n\n```go\nfunc (err *TaskNotAllowedVars) Code() int\n```\n\n```go\nfunc (err *TaskNotAllowedVars) Error() string\n```\n\n```go\ntype TaskNotFoundError struct {\n\tTaskName   string\n\tDidYouMean string\n}\n```\nTaskNotFoundError is returned when the specified task is not found in the Taskfile.\n\n```go\nfunc (err *TaskNotFoundError) Code() int\n```\n\n```go\nfunc (err *TaskNotFoundError) Error() string\n```\n\n```go\ntype TaskRunError struct {\n\tTaskName string\n\tErr      error\n}\n```\nTaskRunError is returned when a command in a task returns a non-zero exit code.\n\n```go\nfunc (err *TaskRunError) Code() int\n```\n\n```go\nfunc (err *TaskRunError) Error() string\n```\n\n```go\nfunc (err *TaskRunError) TaskExitCode() int\n```\n\n```go\ntype TaskfileAlreadyExistsError struct{}\n```\nTaskfileAlreadyExistsError is returned on creating a Taskfile if one already exists.\n\n```go\nfunc (err TaskfileAlreadyExistsError) Code() int\n```\n\n```go\nfunc (err TaskfileAlreadyExistsError) Error() string\n```\n\n```go\ntype TaskfileCacheNotFoundError struct {\n\tURI string\n}\n```\nTaskfileCacheNotFoundError is returned when the user attempts to use an offline (cached) Taskfile but the files does not exist in the cache.\n\n```go\nfunc (err *TaskfileCacheNotFoundError) Code() int\n```\n\n```go\nfunc (err *TaskfileCacheNotFoundError) Error() string\n```\n\n```go\ntype TaskfileCycleError struct {\n\tSource      string\n\tDestination string\n}\n```\nTaskfileCycleError is returned when we detect that a Taskfile includes a set of Taskfiles that include each other in a cycle.\n\n```go\nfunc (err TaskfileCycleError) Code() int\n```\n\n```go\nfunc (err TaskfileCycleError) Error() string\n```\n\n```go\ntype TaskfileDecodeError struct {\n\tMessage  string\n\tLocation string\n\tLine     int\n\tColumn   int\n\tTag      string\n\tSnippet  TaskfileSnippet\n\tErr      error\n}\n```\n\n```go\nfunc NewTaskfileDecodeError(err error, node *yaml.Node) *TaskfileDecodeError\n```\n\n```go\nfunc (err *TaskfileDecodeError) Code() int\n```\n\n```go\nfunc (err *TaskfileDecodeError) Error() string\n```\n\n```go\nfunc (err *TaskfileDecodeError) Unwrap() error\n```\n\n```go\nfunc (err *TaskfileDecodeError) WithFileInfo(location string, b []byte, padding int) *TaskfileDecodeError\n```\n\n```go\nfunc (err *TaskfileDecodeError) WithMessage(format string, a ...any) *TaskfileDecodeError\n```\n\n```go\nfunc (err *TaskfileDecodeError) WithTypeMessage(t string) *TaskfileDecodeError\n```\n\n```go\ntype TaskfileFetchFailedError struct {\n\tURI            string\n\tHTTPStatusCode int\n}\n```\nTaskfileFetchFailedError is returned when no appropriate Taskfile is found when searching the filesystem.\n\n```go\nfunc (err TaskfileFetchFailedError) Code() int\n```\n\n```go\nfunc (err TaskfileFetchFailedError) Error() string\n```\n\n```go\ntype TaskfileInvalidError struct {\n\tURI string\n\tErr error\n}\n```\nTaskfileInvalidError is returned when the Taskfile contains syntax errors or cannot be parsed for some reason.\n\n```go\nfunc (err TaskfileInvalidError) Code() int\n```\n\n```go\nfunc (err TaskfileInvalidError) Error() string\n```\n\n```go\ntype TaskfileNetworkTimeoutError struct {\n\tURI          string\n\tTimeout      time.Duration\n\tCheckedCache bool\n}\n```\nTaskfileNetworkTimeoutError is returned when the user attempts to use a remote Taskfile but a network connection could not be established within the timeout.\n\n```go\nfunc (err *TaskfileNetworkTimeoutError) Code() int\n```\n\n```go\nfunc (err *TaskfileNetworkTimeoutError) Error() string\n```\n\n```go\ntype TaskfileNotFoundError struct {\n\tURI  string\n\tWalk bool\n}\n```\nTaskfileNotFoundError is returned when no appropriate Taskfile is found when searching the filesystem.\n\n```go\nfunc (err TaskfileNotFoundError) Code() int\n```\n\n```go\nfunc (err TaskfileNotFoundError) Error() string\n```\n\n```go\ntype TaskfileNotSecureError struct {\n\tURI string\n}\n```\nTaskfileNotSecureError is returned when the user attempts to download a remote Taskfile over an insecure connection.\n\n```go\nfunc (err *TaskfileNotSecureError) Code() int\n```\n\n```go\nfunc (err *TaskfileNotSecureError) Error() string\n```\n\n```go\ntype TaskfileNotTrustedError struct {\n\tURI string\n}\n```\nTaskfileNotTrustedError is returned when the user does not accept the trust prompt when downloading a remote Taskfile.\n\n```go\nfunc (err *TaskfileNotTrustedError) Code() int\n```\n\n```go\nfunc (err *TaskfileNotTrustedError) Error() string\n```\n\n```go\ntype TaskfileSnippet struct {\n\tLines     []string\n\tStartLine int\n\tEndLine   int\n\tPadding   int\n}\n```\n\n```go\ntype TaskfileVersionCheckError struct {\n\tURI           string\n\tSchemaVersion *semver.Version\n\tMessage       string\n}\n```\nTaskfileVersionCheckError is returned when the user attempts to run a Taskfile that does not contain a Taskfile schema version key or if they try to use a feature that is not supported by the schema version.\n\n```go\nfunc (err *TaskfileVersionCheckError) Code() int\n```\n\n```go\nfunc (err *TaskfileVersionCheckError) Error() string\n```\n\n","path":"github.com/wailsapp/task/v3/errors","name":"errors","synopsis":"","isRedistributable":true}
