package errors
import "github.com/mooltiverse/nyx/src/go/errors"
This package provides common errors used within the Nyx project.
Index ¶
- type DataAccessError
- type GitError
- type IOError
- type IllegalArgumentError
- type IllegalPropertyError
- type IllegalStateError
- type NilPointerError
- type PatternSyntaxError
- type ReleaseError
- type SecurityError
- type ServiceError
- type TransportError
- type UnsupportedOperationError
Types ¶
type DataAccessError ¶
type DataAccessError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue pertaining data access. Examples are when data can't be read from or written to the file system or from/to the network.
You can create errors like this as: &DataAccessError{Message: fmt.Sprintf("error accessing data: %s", description)}
func (DataAccessError) Error ¶
func (e DataAccessError) Error() string
Returns the error message
func (DataAccessError) GetCause ¶
func (e DataAccessError) GetCause() error
Returns the wrapped error, if any, or nil
type GitError ¶
type GitError struct { // The error message Message string // The optional wrapped error Cause error }
A generic error raised when some Git related issue is encountered.
You can create errors like this as: &GitError{Message: "illegal operation ...."}
func (GitError) Error ¶
Returns the error message
func (GitError) GetCause ¶
Returns the wrapped error, if any, or nil
type IOError ¶
type IOError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue pertaining issues on I/O.
You can create errors like this as: &IOError{Message: "error is ...."}
func (IOError) Error ¶
Returns the error message
func (IOError) GetCause ¶
Returns the wrapped error, if any, or nil
type IllegalArgumentError ¶
type IllegalArgumentError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue pertaining the value of an argument.
You can create errors like this as: &IllegalArgumentError{Message: fmt.Sprintf("illegal argument '%s'", propertyName)}
func (IllegalArgumentError) Error ¶
func (e IllegalArgumentError) Error() string
Returns the error message
func (IllegalArgumentError) GetCause ¶
func (e IllegalArgumentError) GetCause() error
Returns the wrapped error, if any, or nil
type IllegalPropertyError ¶
type IllegalPropertyError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue pertaining the value of a property.
You can create errors like this as: &IllegalPropertyError{Message: fmt.Sprintf("illegal property '%s'", propertyName)}
func (IllegalPropertyError) Error ¶
func (e IllegalPropertyError) Error() string
Returns the error message
func (IllegalPropertyError) GetCause ¶
func (e IllegalPropertyError) GetCause() error
Returns the wrapped error, if any, or nil
type IllegalStateError ¶
type IllegalStateError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue pertaining the current state of an object.
You can create errors like this as: &IllegalStateError{Message: "illegal state ...."}
func (IllegalStateError) Error ¶
func (e IllegalStateError) Error() string
Returns the error message
func (IllegalStateError) GetCause ¶
func (e IllegalStateError) GetCause() error
Returns the wrapped error, if any, or nil
type NilPointerError ¶
type NilPointerError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue about a value being nil when nil is not allowed.
You can create errors like this as: &NilPointerError{Message: fmt.Sprintf("nil pointer '%s'", propertyName)}
func (NilPointerError) Error ¶
func (e NilPointerError) Error() string
Returns the error message
func (NilPointerError) GetCause ¶
func (e NilPointerError) GetCause() error
Returns the wrapped error, if any, or nil
type PatternSyntaxError ¶
type PatternSyntaxError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue about a regular expression syntax.
You can create errors like this as: &PatternSyntaxError{Message: fmt.Sprintf("regular expression '%s' can't be compiled", expression)}
func (PatternSyntaxError) Error ¶
func (e PatternSyntaxError) Error() string
Returns the error message
func (PatternSyntaxError) GetCause ¶
func (e PatternSyntaxError) GetCause() error
Returns the wrapped error, if any, or nil
type ReleaseError ¶
type ReleaseError struct { // The error message Message string // The optional wrapped error Cause error }
An error raised when Nyx encounters an issue during the business operations.
You can create errors like this as: &ReleaseError{Message: fmt.Sprintf("release error: %s", description)}
func (ReleaseError) Error ¶
func (e ReleaseError) Error() string
Returns the error message
func (ReleaseError) GetCause ¶
func (e ReleaseError) GetCause() error
Returns the wrapped error, if any, or nil
type SecurityError ¶
type SecurityError struct { // The error message Message string // The optional wrapped error Cause error }
An error meaning that security constraints failed their checks.
You can create errors like this as: &SecurityError{Message: fmt.Sprintf("security error: %s", description)}
func (SecurityError) Error ¶
func (e SecurityError) Error() string
Returns the error message
func (SecurityError) GetCause ¶
func (e SecurityError) GetCause() error
Returns the wrapped error, if any, or nil
type ServiceError ¶
type ServiceError struct { // The error message Message string // The optional wrapped error Cause error }
This error models an issue pertaining a service.
You can create errors like this as: &ServiceError{Message: fmt.Sprintf("service error: %s", description)}
func (ServiceError) Error ¶
func (e ServiceError) Error() string
Returns the error message
func (ServiceError) GetCause ¶
func (e ServiceError) GetCause() error
Returns the wrapped error, if any, or nil
type TransportError ¶
type TransportError struct { // The error message Message string // The optional wrapped error Cause error }
An error meaning that something in the transport or connection went wrong.
You can create errors like this as: &TransportError{Message: fmt.Sprintf("error accessing data: %s", description)}
func (TransportError) Error ¶
func (e TransportError) Error() string
Returns the error message
func (TransportError) GetCause ¶
func (e TransportError) GetCause() error
Returns the wrapped error, if any, or nil
type UnsupportedOperationError ¶
type UnsupportedOperationError struct { // The error message Message string // The optional wrapped error Cause error }
An error meaning that a certain operation is not supported by the implementation.
You can create errors like this as: &UnsupportedOperationError{Message: fmt.Sprintf("operation is not supported: %s", description)}
func (UnsupportedOperationError) Error ¶
func (e UnsupportedOperationError) Error() string
Returns the error message
func (UnsupportedOperationError) GetCause ¶
func (e UnsupportedOperationError) GetCause() error
Returns the wrapped error, if any, or nil
Source Files ¶
- Version
- v0.0.0-20250213092846-5c6c0e6e1834 (latest)
- Published
- Feb 13, 2025
- Platform
- linux/amd64
- Last checked
- 1 month ago –
Tools for package owners.