Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error describes a failed action with an status code
func WithMessage ¶
WithMessage anotates the error with an optional
func WithStatus ¶
WithStatus annotates a new error with an status code
func (*Error) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface
func (*Error) WithStatus ¶
WithStatus sets the given status code of this error
type StackError ¶
type StackError struct {
// contains filtered or unexported fields
}
StackError contains an error message with an status and the callees stack
func WithStack ¶
func WithStack(message string, status int, err error) *StackError
WithStack returns an error annotated with the stacktrace
func (*StackError) Error ¶
func (s *StackError) Error() string
Error returns the annotated error with its status code and the stacktrace.
func (StackError) StackTrace ¶
func (s StackError) StackTrace() stackTrace
func (*StackError) WithStatus ¶
func (s *StackError) WithStatus(status int)
WithStatus sets the given status to this error
Click to show internal directories.
Click to hide internal directories.