errors

package
v0.0.0-...-8c2d49f Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Error is the root of the error classes. All errors should inherit from this.
	Error = "Error"
	// InternalError is the default error type
	InternalError = "InternalError"
	// IOError is an IO error such as file error
	IOError = "IOError"
	// ArgumentError is for an argument-related error
	ArgumentError = "ArgumentError"
	// NameError is for a constant-related error
	NameError = "NameError"
	// TypeError is for a type-related error
	TypeError = "TypeError"
	// NoMethodError is for an intentionally unsupported-method error
	NoMethodError = "NoMethodError"
	// ConstantAlreadyInitialisedError means user re-declares twice
	ConstantAlreadyInitialisedError = "ConstantAlreadyInitialisedError"
	// ZeroDivisionError is for zero-division by Integer/Float value
	ZeroDivisionError = "ZeroDivisionError"
	// ChannelCloseError is for accessing to the closed channel
	ChannelCloseError = "ChannelCloseError"
	// NotImplementedError is for features that have not been implemented
	NotImplementedError = "NotImplementedError"
)
View Source
const (
	WrongNumberOfArgument       = "Expect %d argument(s). got: %d"
	WrongNumberOfArgumentMore   = "Expect %d or more argument(s). got: %d"
	WrongNumberOfArgumentLess   = "Expect %d or less argument(s). got: %d"
	WrongNumberOfArgumentRange  = "Expect %d to %d argument(s). got: %d"
	WrongArgumentTypeFormat     = "Expect argument to be %s. got: %s"
	WrongArgumentTypeFormatNum  = "Expect argument #%d to be %s. got: %s"
	InvalidChmodNumber          = "Invalid chmod number. got: %d"
	InvalidNumericString        = "Invalid numeric string. got: %s"
	CantLoadFile                = "Can't load \"%s\""
	CantRequireNonString        = "Can't require \"%s\": Pass a string instead"
	CantYieldWithoutBlockFormat = "Can't yield without a block"
	DividedByZero               = "Divided by 0"
	ChannelIsClosed             = "The channel is already closed."
	TooSmallIndexValue          = "Index value %d too small for array. minimum: %d"
	IndexOutOfRange             = "Index value out of range. got: %v"
	NegativeValue               = "Expect argument to be positive value. got: %d"
	NegativeSecondValue         = "Expect second argument to be positive value. got: %d"
	UndefinedMethod             = "Undefined Method '%+v' for %+v"
)

Here defines different error message formats for different types of errors

Variables

Classes a list of error classes to be initialised

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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