goxerrors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoxError

type GoxError struct {
	Type  Type
	Stage gox.GoxErrorStage
	Kind  string

	Route    string
	Method   string
	IsAction bool

	File          string
	Line          int
	Column        int
	GeneratedFile string
	PluginPath    string

	Message  string
	Hint     string
	Expected string
	Found    string

	Cause error
	Stack string

	OriginalError *GoxError

	Status        int
	StatusCode    int
	StatusMessage string
	Details       map[string]string
}

GoxError is the single internal error model used by compiler, template, build, load and runtime layers. Public SDK access must continue going through github.com/gox-lang/gox.Error.

func New

func New(typ Type, stage gox.GoxErrorStage, message string, cause error) *GoxError

func NewFromStage

func NewFromStage(stage gox.GoxErrorStage, message string, cause error) *GoxError

func NewPanic

func NewPanic(recovered any) *GoxError

func (*GoxError) AddDetail

func (e *GoxError) AddDetail(key string, value string) *GoxError

func (*GoxError) CloneDetails

func (e *GoxError) CloneDetails() map[string]string

func (*GoxError) EnsureStatus

func (e *GoxError) EnsureStatus()

func (*GoxError) Error

func (e *GoxError) Error() string

func (*GoxError) GetCause

func (e *GoxError) GetCause() error

func (*GoxError) GetColumn

func (e *GoxError) GetColumn() int

func (*GoxError) GetDetails

func (e *GoxError) GetDetails() map[string]string

func (*GoxError) GetExpected

func (e *GoxError) GetExpected() string

func (*GoxError) GetFile

func (e *GoxError) GetFile() string

func (*GoxError) GetFound

func (e *GoxError) GetFound() string

func (*GoxError) GetGeneratedFile

func (e *GoxError) GetGeneratedFile() string

func (*GoxError) GetHint

func (e *GoxError) GetHint() string

func (*GoxError) GetIsAction

func (e *GoxError) GetIsAction() bool

func (*GoxError) GetKind

func (e *GoxError) GetKind() string

func (*GoxError) GetLine

func (e *GoxError) GetLine() int

func (*GoxError) GetMessage

func (e *GoxError) GetMessage() string

func (*GoxError) GetMethod

func (e *GoxError) GetMethod() string

func (*GoxError) GetOriginalError

func (e *GoxError) GetOriginalError() gox.Error

func (*GoxError) GetPluginPath

func (e *GoxError) GetPluginPath() string

func (*GoxError) GetRoute

func (e *GoxError) GetRoute() string

func (*GoxError) GetStack

func (e *GoxError) GetStack() string

func (*GoxError) GetStage

func (e *GoxError) GetStage() gox.GoxErrorStage

func (*GoxError) GetStatusCode

func (e *GoxError) GetStatusCode() int

func (*GoxError) GetStatusMessage

func (e *GoxError) GetStatusMessage() string

func (*GoxError) Unwrap

func (e *GoxError) Unwrap() error

type Type

type Type string

Type identifies the subsystem that produced a Gox error.

const (
	TypeCompiler Type = "compiler"
	TypeTemplate Type = "template"
	TypeRuntime  Type = "runtime"
	TypeBuild    Type = "build"
	TypeLoad     Type = "load"
	TypeResponse Type = "response"
	TypeFlow     Type = "flow"
	TypeHTTP     Type = "http"
	TypePanic    Type = "panic"
)

func TypeFromStage

func TypeFromStage(stage gox.GoxErrorStage) Type

Jump to

Keyboard shortcuts

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