Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigError ¶
ConfigError represents a configuration error
func NewConfigError ¶
func NewConfigError(field, value string, err error) *ConfigError
NewConfigError creates a new config error
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
Error implements the error interface
func (*ConfigError) Unwrap ¶
func (e *ConfigError) Unwrap() error
Unwrap returns the underlying error
type ErrorType ¶
type ErrorType string
Error types for the lightning-code-index system
const ( // Indexing errors ErrorTypeIndexing ErrorType = "indexing" ErrorTypeParse ErrorType = "parse" ErrorTypeSearch ErrorType = "search" // File errors ErrorTypeFileNotFound ErrorType = "file_not_found" ErrorTypeFileTooLarge ErrorType = "file_too_large" ErrorTypePermission ErrorType = "permission" // Configuration errors ErrorTypeConfig ErrorType = "config" // Internal errors ErrorTypeInternal ErrorType = "internal" )
type FileError ¶
type FileError struct {
Type ErrorType
Path string
Operation string
Underlying error
Timestamp time.Time
}
FileError represents a file-related error
func NewFileError ¶
NewFileError creates a new file error
type IndexingError ¶
type IndexingError struct {
Type ErrorType
FileID types.FileID
FilePath string
Operation string
Underlying error
Timestamp time.Time
Recoverable bool
}
IndexingError represents an error during the indexing process
func NewIndexingError ¶
func NewIndexingError(op string, err error) *IndexingError
NewIndexingError creates a new indexing error with context
func (*IndexingError) Error ¶
func (e *IndexingError) Error() string
Error implements the error interface
func (*IndexingError) IsRecoverable ¶
func (e *IndexingError) IsRecoverable() bool
IsRecoverable checks if the error can be retried
func (*IndexingError) Unwrap ¶
func (e *IndexingError) Unwrap() error
Unwrap returns the underlying error for errors.Is/As
func (*IndexingError) WithFile ¶
func (e *IndexingError) WithFile(fileID types.FileID, path string) *IndexingError
WithFile adds file information to the error
func (*IndexingError) WithRecoverable ¶
func (e *IndexingError) WithRecoverable(recoverable bool) *IndexingError
WithRecoverable marks the error as recoverable
type MultiError ¶
type MultiError struct {
Errors []error
}
MultiError represents multiple errors
func NewMultiError ¶
func NewMultiError(errs []error) *MultiError
NewMultiError creates a new multi-error
type ParseError ¶
type ParseError struct {
Type ErrorType
FileID types.FileID
FilePath string
Line int
Column int
Token string
Underlying error
Timestamp time.Time
}
ParseError represents a parsing error
func NewParseError ¶
func NewParseError(fileID types.FileID, path string, line, column int, token string, err error) *ParseError
NewParseError creates a new parse error
type SearchError ¶
SearchError represents a search operation error
func NewSearchError ¶
func NewSearchError(pattern string, err error) *SearchError
NewSearchError creates a new search error
func (*SearchError) Error ¶
func (e *SearchError) Error() string
Error implements the error interface
func (*SearchError) Unwrap ¶
func (e *SearchError) Unwrap() error
Unwrap returns the underlying error