The highest tagged major version is
v2 .
Discover Packages
github.com/alexec/argo
errors
package
Version:
v2.1.2+incompatible
Opens a new window with list of versions in this module.
Published: Oct 11, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
Cause(err)
Errorf(code, format, args)
InternalError(message)
InternalErrorf(format, args)
InternalWrapError(err, message)
InternalWrapErrorf(err, format, args)
IsCode(code, err)
New(code, message)
Wrap(err, code, message)
Types
Source Files
Documentation
Documentation
¶
Constants
func Cause(err error) error
func Errorf(code string, format string, args ...interface{}) error
func InternalError(message string) error
func InternalErrorf(format string, args ...interface{}) error
func InternalWrapError(err error, message ...string) error
func InternalWrapErrorf(err error, format string, args ...interface{}) error
func IsCode(code string, err error) bool
func New(code string, message string) error
func Wrap(err error, code string, message string) error
type ArgoError
View Source
const (
CodeUnauthorized = "ERR_UNAUTHORIZED"
CodeBadRequest = "ERR_BAD_REQUEST"
CodeForbidden = "ERR_FORBIDDEN"
CodeNotFound = "ERR_NOT_FOUND"
CodeTimeout = "ERR_TIMEOUT"
CodeInternal = "ERR_INTERNAL"
)
Externally visible error codes
Cause returns the underlying cause of the error, if possible.
An error value has a cause if it implements the following
interface:
type causer interface {
Cause() error
}
If the error does not implement Cause, the original error will
be returned. If the error is nil, nil will be returned without further
investigation.
Errorf returns an error and formats according to a format specifier
InternalError is a convenience function to create a Internal error with a message
func InternalErrorf(format string , args ...interface{}) error
InternalErrorf is a convenience function to format an Internal error
InternalWrapError annotates the error with the ERR_INTERNAL code and a stack trace, optional message
InternalWrapErrorf annotates the error with the ERR_INTERNAL code and a stack trace, optional message
IsCode is a helper to determine if the error is of a specific code
New returns an error with the supplied message.
New also records the stack trace at the point it was called.
Wrap returns an error annotating err with a stack trace at the point Wrap is called,
and a new supplied message. The previous original is preserved and accessible via Cause().
If err is nil, Wrap returns nil.
ArgoError is an error interface that additionally adds support for
stack trace, error code, and a JSON representation of the error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.