Documentation
¶
Index ¶
- func Exit(err *ExitError)
- func IsHttpException(err error) bool
- func LogContext(err error, extra ...exceptioncontract.Context) exceptioncontract.Context
- func MarkLogged(err error) error
- func Panic(err *Error)
- type Error
- func FromError(err error) *Error
- func FromErrorWithLevel(err error, level loggingcontract.Level) *Error
- func NewEmergency(message string, context exceptioncontract.Context, causeErr error) *Error
- func NewError(message string, context exceptioncontract.Context, causeErr error) *Error
- func NewInfo(message string, context exceptioncontract.Context, causeErr error) *Error
- func NewWarning(message string, context exceptioncontract.Context, causeErr error) *Error
- func (instance *Error) AlreadyLogged() bool
- func (instance *Error) CauseErr() error
- func (instance *Error) Context() exceptioncontract.Context
- func (instance *Error) Error() string
- func (instance *Error) Level() loggingcontract.Level
- func (instance *Error) MarkAsLogged()
- func (instance *Error) Message() string
- func (instance *Error) SetContext(context exceptioncontract.Context)
- func (instance *Error) SetContextValue(key string, value any)
- func (instance *Error) Unwrap() error
- type ExitError
- type HttpException
- func AsHttpException(err error) *HttpException
- func BadGateway(message string) *HttpException
- func BadRequest(message string) *HttpException
- func Conflict(message string) *HttpException
- func Forbidden(message string) *HttpException
- func GatewayTimeout(message string) *HttpException
- func Gone(message string) *HttpException
- func InternalServerError(message string) *HttpException
- func MethodNotAllowed(message string) *HttpException
- func NewHttpException(statusCode int, message string) *HttpException
- func NewHttpExceptionWithCause(statusCode int, message string, causeErr error) *HttpException
- func NotAcceptable(message string) *HttpException
- func NotFound(message string) *HttpException
- func NotImplemented(message string) *HttpException
- func PaymentRequired(message string) *HttpException
- func RequestTimeout(message string) *HttpException
- func ServiceUnavailable(message string) *HttpException
- func TooManyRequests(message string) *HttpException
- func Unauthorized(message string) *HttpException
- func UnprocessableEntity(message string) *HttpException
- func ValidationFailed(validationErrors any) *HttpException
- func (instance *HttpException) AlreadyLogged() bool
- func (instance *HttpException) CauseErr() error
- func (instance *HttpException) Context() exceptioncontract.Context
- func (instance *HttpException) Error() string
- func (instance *HttpException) MarkAsLogged()
- func (instance *HttpException) Message() string
- func (instance *HttpException) SetContext(context exceptioncontract.Context)
- func (instance *HttpException) SetContextValue(key string, value any)
- func (instance *HttpException) StatusCode() int
- func (instance *HttpException) Unwrap() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsHttpException ¶
func LogContext ¶
func LogContext(err error, extra ...exceptioncontract.Context) exceptioncontract.Context
func MarkLogged ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func FromErrorWithLevel ¶
func FromErrorWithLevel(err error, level loggingcontract.Level) *Error
func NewEmergency ¶
func NewEmergency(message string, context exceptioncontract.Context, causeErr error) *Error
func NewError ¶
func NewError(message string, context exceptioncontract.Context, causeErr error) *Error
func NewInfo ¶
func NewInfo(message string, context exceptioncontract.Context, causeErr error) *Error
func NewWarning ¶
func NewWarning(message string, context exceptioncontract.Context, causeErr error) *Error
func (*Error) AlreadyLogged ¶
func (*Error) Context ¶
func (instance *Error) Context() exceptioncontract.Context
func (*Error) Level ¶
func (instance *Error) Level() loggingcontract.Level
func (*Error) MarkAsLogged ¶
func (instance *Error) MarkAsLogged()
func (*Error) SetContext ¶
func (instance *Error) SetContext(context exceptioncontract.Context)
func (*Error) SetContextValue ¶
type ExitError ¶
type ExitError struct {
// contains filtered or unexported fields
}
func NewExitError ¶
func (*ExitError) ErrorValue ¶
type HttpException ¶
type HttpException struct {
// contains filtered or unexported fields
}
func AsHttpException ¶
func AsHttpException(err error) *HttpException
func BadGateway ¶
func BadGateway(message string) *HttpException
func BadRequest ¶
func BadRequest(message string) *HttpException
func Conflict ¶
func Conflict(message string) *HttpException
func Forbidden ¶
func Forbidden(message string) *HttpException
func GatewayTimeout ¶
func GatewayTimeout(message string) *HttpException
func Gone ¶
func Gone(message string) *HttpException
func InternalServerError ¶
func InternalServerError(message string) *HttpException
func MethodNotAllowed ¶
func MethodNotAllowed(message string) *HttpException
func NewHttpException ¶
func NewHttpException(statusCode int, message string) *HttpException
func NewHttpExceptionWithCause ¶
func NewHttpExceptionWithCause(statusCode int, message string, causeErr error) *HttpException
func NotAcceptable ¶
func NotAcceptable(message string) *HttpException
func NotFound ¶
func NotFound(message string) *HttpException
func NotImplemented ¶
func NotImplemented(message string) *HttpException
func PaymentRequired ¶
func PaymentRequired(message string) *HttpException
func RequestTimeout ¶
func RequestTimeout(message string) *HttpException
func ServiceUnavailable ¶
func ServiceUnavailable(message string) *HttpException
func TooManyRequests ¶
func TooManyRequests(message string) *HttpException
func Unauthorized ¶
func Unauthorized(message string) *HttpException
func UnprocessableEntity ¶
func UnprocessableEntity(message string) *HttpException
func ValidationFailed ¶
func ValidationFailed(validationErrors any) *HttpException
func (*HttpException) AlreadyLogged ¶
func (instance *HttpException) AlreadyLogged() bool
func (*HttpException) CauseErr ¶
func (instance *HttpException) CauseErr() error
func (*HttpException) Context ¶
func (instance *HttpException) Context() exceptioncontract.Context
func (*HttpException) Error ¶
func (instance *HttpException) Error() string
func (*HttpException) MarkAsLogged ¶
func (instance *HttpException) MarkAsLogged()
func (*HttpException) Message ¶
func (instance *HttpException) Message() string
func (*HttpException) SetContext ¶
func (instance *HttpException) SetContext(context exceptioncontract.Context)
func (*HttpException) SetContextValue ¶
func (instance *HttpException) SetContextValue(key string, value any)
func (*HttpException) StatusCode ¶
func (instance *HttpException) StatusCode() int
func (*HttpException) Unwrap ¶
func (instance *HttpException) Unwrap() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.