Documentation
¶
Overview ¶
Package errors provides custom error types and error handling utilities for YAP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorType ¶
type ErrorType string
ErrorType represents different categories of errors in the application.
const ( // ErrTypeValidation represents validation errors. ErrTypeValidation ErrorType = "validation" // ErrTypeFileSystem represents filesystem errors. ErrTypeFileSystem ErrorType = "filesystem" // ErrTypeNetwork represents network errors. ErrTypeNetwork ErrorType = "network" // ErrTypePackaging represents packaging errors. ErrTypePackaging ErrorType = "packaging" // ErrTypeConfiguration represents configuration errors. ErrTypeConfiguration ErrorType = "configuration" // ErrTypeBuild represents build errors. ErrTypeBuild ErrorType = "build" // ErrTypeParser represents parser errors. ErrTypeParser ErrorType = "parser" // ErrTypeInternal represents internal errors. ErrTypeInternal ErrorType = "internal" )
type YapError ¶
type YapError struct {
Type ErrorType
Message string
Cause error
Operation string
Context map[string]any
}
YapError represents a structured error with context.
func (*YapError) WithContext ¶
WithContext adds context information to the error.
func (*YapError) WithOperation ¶
WithOperation sets the operation that caused the error.
Click to show internal directories.
Click to hide internal directories.