oakerr

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package oakerr stores errors returned throughout oak.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLanguageString

func SetLanguageString(language string) error

SetLanguageString parses a string as a language

Types

type ExistingElement

type ExistingElement struct {
	InputName   string
	InputType   string
	Overwritten bool
}

ExistingElement is an alternative to ExistingFont, where in this case the existing element is -not- overwritten.

func (ExistingElement) Error

func (ee ExistingElement) Error() string

type IndivisibleInput

type IndivisibleInput struct {
	InputName    string
	MustDivideBy int
}

IndivisibleInput is returned from functions expecting a count of inputs in a slice or variadic argument divisible by some integer, or an integer value divisible by some integer. IsList represents which input type was expected.

func (IndivisibleInput) Error

func (ii IndivisibleInput) Error() string

type InsufficientInputs

type InsufficientInputs struct {
	AtLeast   int
	InputName string
}

InsufficientInputs is returned when something requires at least some number of inputs in a variadic argument, but that minimum was not supplied.

func (InsufficientInputs) Error

func (ii InsufficientInputs) Error() string

type InvalidInput

type InvalidInput struct {
	InputName string
}

InvalidInput is a generic struct returned for otherwise invalid input.

func (InvalidInput) Error

func (ii InvalidInput) Error() string

type Language

type Language int

Language configures the language of returned error strings

const (
	// English
	ENG Language = iota
	// German
	DEU
	// Japanese
	JPN
)

Valid languages, uppercase ISO 639-2

var (
	// CurrentLanguage is the current language for error and log strings
	CurrentLanguage Language
)

type NilInput

type NilInput struct {
	InputName string
}

NilInput is returned from functions expecting a non-nil pointer which receive a nil pointer.

func (NilInput) Error

func (ni NilInput) Error() string

type NotFound

type NotFound struct {
	InputName string
}

NotFound is returned when some input was queried but not found.

func (NotFound) Error

func (nf NotFound) Error() string

type UnsupportedFormat

type UnsupportedFormat struct {
	Format string
}

UnsupportedFormat is returned by functions expecting formatted data or files which received a format they can't use.

func (UnsupportedFormat) Error

func (uf UnsupportedFormat) Error() string

type UnsupportedPlatform

type UnsupportedPlatform struct {
	Operation string
}

UnsupportedPlatform is returned when functionality isn't supported on the hardware or operating system used.

func (UnsupportedPlatform) Error

func (up UnsupportedPlatform) Error() string

Jump to

Keyboard shortcuts

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