errors

package
v0.0.1-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package errors content relative to the package

Package diagnostics content relative to the package

Index

Constants

View Source
const (
	// MetaLocation values used to save location information of an error.
	MetaLocation = "loc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	AddMeta(key string, value interface{}) Error
	ThroughBy(err error) Error

	ExitStatus() int
	Error() string
	Message() string
	// contains filtered or unexported methods
}

Error encapsulates error info.

func CommandNotFound

func CommandNotFound(msg string, args ...interface{}) Error

CommandNotFound return a command not found error.

func EvalDiagnostics

func EvalDiagnostics(d hcl.Diagnostics) Error

EvalDiagnostics return error or nil depending on the diagnostics.

func IncorrectUsage

func IncorrectUsage(msg string, args ...interface{}) Error

IncorrectUsage return an incorrect usage error.

func InvalidArguments

func InvalidArguments(msg string, args ...interface{}) Error

InvalidArguments return an invalid arguments error.

func LimitsExceed

func LimitsExceed(msg string, args ...interface{}) Error

LimitsExceed return an limit exceed error.

func ThrowBlocksAreNotPermitted

func ThrowBlocksAreNotPermitted(action string) Error

ThrowBlocksAreNotPermitted throw an unsupported block error.

func ThrowMissingRequiredLabel

func ThrowMissingRequiredLabel(block string) Error

ThrowMissingRequiredLabel throw a missing required label error.

func ThrowUnsupportedArgument

func ThrowUnsupportedArgument(block, argument string) Error

ThrowUnsupportedArgument throw an unsupported argument error.

func ThrowUnsupportedArguments

func ThrowUnsupportedArguments(block string) Error

func ThrowUnsupportedBlock

func ThrowUnsupportedBlock(parent, child string) Error

ThrowUnsupportedBlock throw an unsupported block error.

func ThrowUnsupportedBlocks

func ThrowUnsupportedBlocks(block string) Error

func ThrowsExceeddedNumberOfBlocks

func ThrowsExceeddedNumberOfBlocks(block string, max int) Error

func Unexpected

func Unexpected(msg string, args ...interface{}) Error

Unexpected return an unexpectedErrCode error.

Jump to

Keyboard shortcuts

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