kit

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	Filename() string
	Index() uint
	Line() uint
	Column() uint
	Message() string
	ErrCode() int
	IncorrectUserType() string
}

func ConvertError

func ConvertError(f *fs.File, err any) Error

ConvertError converts error to Error interface. Used in JSight API Core.

type JSchemaError added in v0.2.0

type JSchemaError struct {

	// ObjectKey contains the name of the property of the object where the error was detected
	ObjectKey string
	// contains filtered or unexported fields
}

JSchemaError contains methods for forming a detailed description of the error for a person. The resulting message will contain the filename, line number, and where the error occurred.

func NewJSchemaError added in v0.2.0

func NewJSchemaError(file *fs.File, e *errs.Err) JSchemaError

func (JSchemaError) Code added in v0.2.0

func (e JSchemaError) Code() errs.Code

func (JSchemaError) Column added in v0.2.0

func (e JSchemaError) Column() uint

func (JSchemaError) ErrCode added in v0.2.0

func (e JSchemaError) ErrCode() int

func (JSchemaError) Error added in v0.2.0

func (e JSchemaError) Error() string

func (JSchemaError) Filename added in v0.2.0

func (e JSchemaError) Filename() string

func (JSchemaError) IncorrectUserType added in v0.2.0

func (e JSchemaError) IncorrectUserType() string

func (JSchemaError) Index added in v0.2.0

func (e JSchemaError) Index() uint

func (JSchemaError) Line added in v0.2.0

func (e JSchemaError) Line() uint

Line returns 0 if the line number cannot be determined, or 1+ if it can.

func (JSchemaError) Message added in v0.2.0

func (e JSchemaError) Message() string

func (*JSchemaError) SetFile added in v0.2.0

func (e *JSchemaError) SetFile(file *fs.File)

func (*JSchemaError) SetIncorrectUserType added in v0.2.0

func (e *JSchemaError) SetIncorrectUserType(s string)

func (*JSchemaError) SetIndex added in v0.2.0

func (e *JSchemaError) SetIndex(index bytes.Index)

func (*JSchemaError) SetMessage added in v0.2.0

func (e *JSchemaError) SetMessage(message string)

func (*JSchemaError) SourceSubString added in v0.2.0

func (e *JSchemaError) SourceSubString() string

SourceSubString returns empty string, if cannot determine the source sub-string.

func (*JSchemaError) String added in v0.2.0

func (e *JSchemaError) String() string

Jump to

Keyboard shortcuts

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