errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package errors provides internationalized error definitions and utilities.

It uses the national package for i18n support and defines common error sentences that can be translated and formatted with context.

Index

Constants

View Source
const (
	CompileExpressionError        i.Sentence = "Compile expression {{.express}} error"
	EvaluateExpressionError       i.Sentence = "Evaluate expression error: {{.error}}"
	ExpectedTypeButError          i.Sentence = "Type {{.expected}} is expected but got {{.actual}}"
	MissingTemplateError          i.Sentence = "Template is missing"
	MissingValueError             i.Sentence = "Missing required value"
	MissingAuthenticationToken    i.Sentence = "Missing authentication token"
	OverwriteInternalBuiltinError i.Sentence = "Internal builtin {{.builtin}} can't be overwritten"
	OverwriteBuiltinError         i.Sentence = "Builtin {{.builtin}} can't be overwritten"
	OverwriteIsForbiddenError     i.Sentence = "Overwrite {{.target}} of {{.type}} is not allowed"
	Unauthorized                  i.Sentence = "Unauthorized"
	UnexpectedTypeError           i.Sentence = "Got unexpected {{.type}}"
	UnexpectedValueError          i.Sentence = "Got unexpected {{.type}} {{.value}}"
	UnrecognizedError             i.Sentence = "Unrecognized {{.type}} {{.value}}"
	UnsupportedValueError         i.Sentence = "Unsupported {{.type}} {{.value}}"
	NotFoundError                 i.Sentence = "{{.type}} {{.value}} not found"
)

Variables

This section is empty.

Functions

func No

func No(e error, argv ...any) *i.Message

func Yes

func Yes(actors ...func()) *i.Message

Types

This section is empty.

Jump to

Keyboard shortcuts

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