debug

package
v0.0.0-...-de9fdfd Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(base error, err string, debug ...*Debug) error

Types

type Debug

type Debug struct {
	// Line represents the line of the node
	Line int `yaml:"line"`
	// Column represents the column of the node
	Column int `yaml:"column"`
	// ColumnEnd represents the end index
	ColumnEnd int `yaml:"column_end"`
	// File represents the file of the node
	File string `yaml:"file"`
	// Near represents the code near the node
	Near string `yaml:"-"`
}

func Unwrap

func Unwrap(err error) (error, string, *Debug)

func (*Debug) GetDebug

func (d *Debug) GetDebug() *Debug

type DebugErr

type DebugErr struct {
	// contains filtered or unexported fields
}

func (*DebugErr) Error

func (de *DebugErr) Error() string

func (*DebugErr) HtmlError

func (de *DebugErr) HtmlError() *HtmlError

HtmlError returns the error message with debug information html

func (*DebugErr) JSONError

func (de *DebugErr) JSONError() (string, bool)

JSONError returns the error message with debug information json

func (*DebugErr) Unwrap

func (de *DebugErr) Unwrap() error

type HtmlError

type HtmlError struct {
	Code []byte
	// contains filtered or unexported fields
}

HtmlError is an error with HTML debug information

func NewHtmlError

func NewHtmlError(de *DebugErr) *HtmlError

NewHtmlError creates a new HtmlError

func (*HtmlError) Debug

func (he *HtmlError) Debug() *DebugErr

func (*HtmlError) Error

func (he *HtmlError) Error() string

Error returns the error message with HTML debug information

Jump to

Keyboard shortcuts

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