apperr

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apperr defines aitk's typed errors: a stable code, an exit code, and a fix hint.

Index

Constants

View Source
const (
	ExitOK       = 0
	ExitRuntime  = 1
	ExitUsage    = 2
	ExitGate     = 3
	ExitConflict = 4
)

Exit codes (docs/spec/cli.md).

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string // E_*
	Message string
	Fix     string // exact command or action that resolves the error
	Exit    int
}

Error is returned by every command that fails in an expected way.

func NeedsMigration

func NeedsMigration() *Error

func New

func New(code string, exit int, fix, format string, args ...any) *Error

New builds an Error.

func NoActiveTask

func NoActiveTask() *Error

func NotAProject

func NotAProject() *Error

Common constructors.

func TaskNotFound

func TaskNotFound(id string) *Error

func Usage

func Usage(format string, args ...any) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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