Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomError ¶
CustomError is an customized error
type CustomizableError ¶ added in v1.0.14
CustomizableError is a error with a error with a customizable message
func (*CustomizableError) Error ¶ added in v1.0.14
func (e *CustomizableError) Error() string
func (*CustomizableError) GetInternalError ¶ added in v1.0.14
func (e *CustomizableError) GetInternalError() error
func (*CustomizableError) GetMessage ¶ added in v1.0.14
func (e *CustomizableError) GetMessage() string
type ErrorCallbacks ¶
ErrorCallbacks is the definition of a object responsible to get the callbacks registereb by a ErrorManager object
type ErrorCatcher ¶
type ErrorCatcher interface { CatchError(err error, errorfn func(error)) CatchErrorAndFinally(err error, errorfn func(error), finallyfn func()) OnErrorContinue(tryfn func()) EvenErrorFinally(err error, finallyfn func()) TryCatchError(tryfn func(), errorfn func(error)) TryFinally(tryfn func(), finallyfn func()) TryCatchErrorAndFinally(tryfn func(), errorfn func(error), finallyfn func()) }
ErrorCatcher defines a object responsible to catch the errors
func NewErrorCatcher ¶
func NewErrorCatcher(logger logs.ErrorLogger) ErrorCatcher
NewErrorCatcher returns a ErrorCatcher object
type ErrorDefer ¶
ErrorDefer is the definition of a object responsible to hanles errors
func NewErrorDefer ¶
func NewErrorDefer(thrower ErrorThrower) ErrorDefer
NewErrorDefer return a ErrorDefer
type ErrorManager ¶
type ErrorManager interface {
On(err interface{}, callback func(err error))
}
ErrorManager is the definition of a object responsible to set callbacks to error definitions
type ErrorThrower ¶
type ErrorThrower interface {
Throw(err error)
}
ErrorThrower defines a object responsible to throws errors
func NewErrorThrower ¶
func NewErrorThrower(errorCallbacks ErrorCallbacks) ErrorThrower
NewErrorThrower returns a ErrorThrower
Source Files ¶
Click to show internal directories.
Click to hide internal directories.