Documentation
¶
Index ¶
- Variables
- func TracedError(errorMessageOrError interface{}) (tracedError error)
- func TracedErrorEmptyString(stringVarName string, errorToUnwrap ...error) (tracedError error)
- func TracedErrorNil(nilVarName string) (tracedError error)
- func TracedErrorNilf(formatString string, args ...interface{}) (tracedError error)
- func TracedErrorNotImplemented() (tracedError error)
- func TracedErrorf(formatString string, args ...interface{}) (tracedError error)
- type ErrorsService
- func (e *ErrorsService) AddErrorToUnwrapToTracedError(tracedError error, errorToAdd error) error
- func (e *ErrorsService) GetAsTracedError(errorToConvert error) (tracedError *TracedErrorType, err error)
- func (e ErrorsService) IsEmptyStringError(err error) (isEmptyStringError bool)
- func (e ErrorsService) IsNilError(err error) (IsNilError bool)
- func (e ErrorsService) IsNotImplementedError(err error) (isNotImplementedError bool)
- func (e ErrorsService) IsTracedError(err error) (isTracedError bool)
- func (e *ErrorsService) MustGetAsTracedError(errorToConvert error) (tracedError *TracedErrorType)
- func (e ErrorsService) UnwrapRecursive(errorToUnwrap error) (errors []error)
- type TracedErrorType
- func (t TracedErrorType) Error() (errorMessage string)
- func (t *TracedErrorType) GetErrorMessage() (errorMessage string, err error)
- func (t *TracedErrorType) GetErrorsToUnwrap() (errorsToUnwrap []error, err error)
- func (t *TracedErrorType) GetFormattedError() (formattedError error, err error)
- func (t *TracedErrorType) GetFunctionCalls() (functionCalls []string, err error)
- func (t *TracedErrorType) MustGetErrorMessage() (errorMessage string)
- func (t *TracedErrorType) MustGetErrorsToUnwrap() (errorsToUnwrap []error)
- func (t *TracedErrorType) MustGetFormattedError() (formattedError error)
- func (t *TracedErrorType) MustGetFunctionCalls() (functionCalls []string)
- func (t *TracedErrorType) MustSetErrorsToUnwrap(errorsToUnwrap []error)
- func (t *TracedErrorType) MustSetFormattedError(formattedError error)
- func (t *TracedErrorType) MustSetFunctionCalls(functionCalls []string)
- func (t *TracedErrorType) SetErrorsToUnwrap(errorsToUnwrap []error) (err error)
- func (t *TracedErrorType) SetFormattedError(formattedError error) (err error)
- func (t *TracedErrorType) SetFunctionCalls(functionCalls []string) (err error)
- func (t TracedErrorType) Unwrap() (errors []error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTracedError = errors.New("asciichgolangpublic TracedError base")
View Source
var ErrTracedErrorEmptyString = errors.New("asciichgolangpublic TracedError empty string")
View Source
var ErrTracedErrorNil = errors.New("asciichgolangpublic TracedError nil")
View Source
var ErrTracedErrorNotImplemented = errors.New("asciichgolangpublic TracedError not implemented")
Functions ¶
func TracedError ¶
func TracedError(errorMessageOrError interface{}) (tracedError error)
Create a new error with given error or error message. TracedErrors extends the error message by a human readable stack trace.
func TracedErrorEmptyString ¶
func TracedErrorNil ¶
func TracedErrorNilf ¶
func TracedErrorNotImplemented ¶
func TracedErrorNotImplemented() (tracedError error)
func TracedErrorf ¶
Create a new error with given error or error message. TracedErrors extends the error message by a human readable stack trace. Error wrapping using '%w' in format string is supported.
Types ¶
type ErrorsService ¶
type ErrorsService struct{}
func Errors ¶
func Errors() (e *ErrorsService)
func NewErrorsService ¶
func NewErrorsService() (e *ErrorsService)
func (*ErrorsService) AddErrorToUnwrapToTracedError ¶
func (e *ErrorsService) AddErrorToUnwrapToTracedError(tracedError error, errorToAdd error) error
func (*ErrorsService) GetAsTracedError ¶
func (e *ErrorsService) GetAsTracedError(errorToConvert error) (tracedError *TracedErrorType, err error)
func (ErrorsService) IsEmptyStringError ¶
func (e ErrorsService) IsEmptyStringError(err error) (isEmptyStringError bool)
func (ErrorsService) IsNilError ¶
func (e ErrorsService) IsNilError(err error) (IsNilError bool)
func (ErrorsService) IsNotImplementedError ¶
func (e ErrorsService) IsNotImplementedError(err error) (isNotImplementedError bool)
func (ErrorsService) IsTracedError ¶
func (e ErrorsService) IsTracedError(err error) (isTracedError bool)
Returns true if given error 'err' is a TracedError, false otherwise.
func (*ErrorsService) MustGetAsTracedError ¶
func (e *ErrorsService) MustGetAsTracedError(errorToConvert error) (tracedError *TracedErrorType)
func (ErrorsService) UnwrapRecursive ¶
func (e ErrorsService) UnwrapRecursive(errorToUnwrap error) (errors []error)
type TracedErrorType ¶
type TracedErrorType struct {
// contains filtered or unexported fields
}
func NewTracedErrorType ¶
func NewTracedErrorType() (t *TracedErrorType)
func (TracedErrorType) Error ¶
func (t TracedErrorType) Error() (errorMessage string)
func (*TracedErrorType) GetErrorMessage ¶
func (t *TracedErrorType) GetErrorMessage() (errorMessage string, err error)
func (*TracedErrorType) GetErrorsToUnwrap ¶
func (t *TracedErrorType) GetErrorsToUnwrap() (errorsToUnwrap []error, err error)
func (*TracedErrorType) GetFormattedError ¶
func (t *TracedErrorType) GetFormattedError() (formattedError error, err error)
func (*TracedErrorType) GetFunctionCalls ¶
func (t *TracedErrorType) GetFunctionCalls() (functionCalls []string, err error)
func (*TracedErrorType) MustGetErrorMessage ¶
func (t *TracedErrorType) MustGetErrorMessage() (errorMessage string)
func (*TracedErrorType) MustGetErrorsToUnwrap ¶
func (t *TracedErrorType) MustGetErrorsToUnwrap() (errorsToUnwrap []error)
func (*TracedErrorType) MustGetFormattedError ¶
func (t *TracedErrorType) MustGetFormattedError() (formattedError error)
func (*TracedErrorType) MustGetFunctionCalls ¶
func (t *TracedErrorType) MustGetFunctionCalls() (functionCalls []string)
func (*TracedErrorType) MustSetErrorsToUnwrap ¶
func (t *TracedErrorType) MustSetErrorsToUnwrap(errorsToUnwrap []error)
func (*TracedErrorType) MustSetFormattedError ¶
func (t *TracedErrorType) MustSetFormattedError(formattedError error)
func (*TracedErrorType) MustSetFunctionCalls ¶
func (t *TracedErrorType) MustSetFunctionCalls(functionCalls []string)
func (*TracedErrorType) SetErrorsToUnwrap ¶
func (t *TracedErrorType) SetErrorsToUnwrap(errorsToUnwrap []error) (err error)
func (*TracedErrorType) SetFormattedError ¶
func (t *TracedErrorType) SetFormattedError(formattedError error) (err error)
func (*TracedErrorType) SetFunctionCalls ¶
func (t *TracedErrorType) SetFunctionCalls(functionCalls []string) (err error)
func (TracedErrorType) Unwrap ¶
func (t TracedErrorType) Unwrap() (errors []error)
Click to show internal directories.
Click to hide internal directories.