nexerrors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllCodes dient als Referenzliste für Tests und Dokumentation

Functions

func GetExitCode

func GetExitCode(err error) int

GetExitCode findet den richtigen Code, egal wie tief der Fehler gewrapped ist

Types

type Code

type Code string
const (
	// Input
	MissingField  Code = "MISSING_FIELD"
	InvalidFormat Code = "INVALID_FORMAT"
	InvalidValue  Code = "INVALID_VALUE"

	// Normalize
	AmbiguousValue      Code = "AMBIGUOUS_VALUE"
	NormalizationFailed Code = "NORMALIZATION_FAILED"
	IncompleteParty     Code = "INCOMPLETE_PARTY"

	// Master Validate
	RuleViolation Code = "RULE_VIOLATION"
	TotalMismatch Code = "TOTAL_MISMATCH"
	Inconsistent  Code = "INCONSISTENT_DATA"

	// Render
	EmptyInput       Code = "EMPTY_INPUT"
	WriteError       Code = "WRITE_ERROR"
	ReadError        Code = "READ_ERROR"
	LoEngineError    Code = "LO_ENGINE_ERROR"
	JAVAEngineError  Code = "JAVA_ENGINE_ERROR"
	ContainerTimeout Code = "TIME_OUT"
	JobStatusError   Code = "JOB_STATUS_ERROR"

	InternalError Code = "INTERNAL_ERROR"
	Unknown       Code = "UNKNOWN_ERROR"
)

type Error

type Error struct {
	Code    Code
	Message string
	Path    string
	Cause   error
}

func New

func New(code Code, msg string, path string) *Error

func Wrap

func Wrap(code Code, msg string, path string, cause error) *Error

func (*Error) Error

func (e *Error) Error() string

Implementierung des standard error Interfaces

func (*Error) Unwrap

func (e *Error) Unwrap() error

Jump to

Keyboard shortcuts

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