Documentation ¶
Overview ¶
Copyright 2017 Applatix, Inc.
Index ¶
- Variables
- func Cause(err error) error
- func Errorf(code string, format string, args ...interface{}) error
- func InternalError(err error) error
- func InternalErrorWithMessage(err error, message string) error
- func InternalErrorf(err error, format string, args ...interface{}) error
- func New(code string, message string) error
- func WithStack(err error, code string) error
- func Wrap(err error, code string, message string) error
- type APIError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CodeBadRequest = "ERR_BAD_REQUEST" CodeForbidden = "ERR_FORBIDDEN" CodeNotFound = "ERR_NOT_FOUND" CodeInternal = "ERR_INTERNAL" )
Externally visible error codes
Functions ¶
func Errorf ¶
Errorf formats according to a format specifier and returns the string as a value that satisfies error. Errorf also records the stack trace at the point it was called.
func InternalError ¶
InternalError annotates the error with the internal error code and a stack trace
func InternalErrorWithMessage ¶
InternalErrorWithMessage annotates the error with the internal error code and a stack trace and message
func InternalErrorf ¶
InternalErrorf annotates the error with the internal error code and a stack trace and a formatted message
func New ¶
New returns an error with the supplied message. New also records the stack trace at the point it was called.
Types ¶
Click to show internal directories.
Click to hide internal directories.