errors

package
v0.0.0-...-cbdeaa7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

JVSRuntime* for runtime results

JVSAst* for Lex, ast parser and Plugin loader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusColor

func StatusColor(status JVSRuntimeStatus) func(str string, modifier ...interface{}) string

render status:

pass green

warning yellow

fail red

unknown light red

func StatusShortString

func StatusShortString(status JVSRuntimeStatus) string

convert status to short string

func StatusString

func StatusString(status JVSRuntimeStatus) string

convert status to string

Types

type JVSAstError

type JVSAstError struct {
	Msg  string
	Item string
	// contains filtered or unexported fields
}

for lexer, parser and plugin loader Msg: messages Item: file, plugin or ast item phase: lex, parse, link or pluginLoad

func JVSAstLexError

func JVSAstLexError(item, msg string) *JVSAstError

create lex error

func JVSAstLinkError

func JVSAstLinkError(item, msg string) *JVSAstError

create link error

func JVSAstParseError

func JVSAstParseError(item, msg string) *JVSAstError

create parse error

func JVSPluginLoadError

func JVSPluginLoadError(pluginName, msg, filePath string) *JVSAstError

create plugin load error

func (*JVSAstError) Error

func (e *JVSAstError) Error() string

type JVSRuntimeResult

type JVSRuntimeResult struct {
	Status JVSRuntimeStatus

	Name string
	// contains filtered or unexported fields
}

runtime result, for build and test

Status: pass, fail, unknown, warning

title: "", Error, Unknown, Warning

msg: messages

Name: build name or test name

func JVSRuntimeResultFail

func JVSRuntimeResultFail(msgs ...string) *JVSRuntimeResult

create fail runtime result

func JVSRuntimeResultPass

func JVSRuntimeResultPass(msgs ...string) *JVSRuntimeResult

create pass runtime result

func JVSRuntimeResultUnknown

func JVSRuntimeResultUnknown(msgs ...string) *JVSRuntimeResult

create unknown runtime result

func JVSRuntimeResultWarning

func JVSRuntimeResultWarning(msgs ...string) *JVSRuntimeResult

create waring runtime result

func NewJVSRuntimeResult

func NewJVSRuntimeResult(status JVSRuntimeStatus, msgs ...string) *JVSRuntimeResult

create runtime result

func (*JVSRuntimeResult) Error

func (e *JVSRuntimeResult) Error() string

func (*JVSRuntimeResult) GetMsg

func (e *JVSRuntimeResult) GetMsg() string

type JVSRuntimeStatus

type JVSRuntimeStatus int
const (
	JVSRuntimePass JVSRuntimeStatus
	JVSRuntimeUnknown
	JVSRuntimeWarning
	JVSRuntimeFail
)

type JVSStderr

type JVSStderr struct {
	Msg string
}

stderr writer, collect stderr output

func (*JVSStderr) Write

func (e *JVSStderr) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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