Documentation ¶
Index ¶
- Constants
- Variables
- func CallStackWithSkipAndDepth(err error, skip, depth int) (callers []string)
- func Caller(err error) (callers []string)
- func CallerWithSkip(err error, skip int) (callers []string)
- func Cause(err error) error
- func Code(err error) int
- func DefaultErrorAccepted() *errors.Error
- func DefaultErrorAlreadyReported() *errors.Error
- func DefaultErrorBadGateway() *errors.Error
- func DefaultErrorBadRequest() *errors.Error
- func DefaultErrorCache() *errors.Error
- func DefaultErrorClientClose() *errors.Error
- func DefaultErrorConflict() *errors.Error
- func DefaultErrorConnectionError() *errors.Error
- func DefaultErrorContinue() *errors.Error
- func DefaultErrorCreated() *errors.Error
- func DefaultErrorDb() *errors.Error
- func DefaultErrorDuplicateKey() *errors.Error
- func DefaultErrorEarlyHints() *errors.Error
- func DefaultErrorEmpty306() *errors.Error
- func DefaultErrorExpectationFailed() *errors.Error
- func DefaultErrorFailedDependency() *errors.Error
- func DefaultErrorFatal() *errors.Error
- func DefaultErrorForbidden() *errors.Error
- func DefaultErrorFound() *errors.Error
- func DefaultErrorGatewayTimeout() *errors.Error
- func DefaultErrorGone() *errors.Error
- func DefaultErrorHttpVersionNotSupported() *errors.Error
- func DefaultErrorIMUsed() *errors.Error
- func DefaultErrorInsufficientStorage() *errors.Error
- func DefaultErrorInternalError() *errors.Error
- func DefaultErrorInternalServer() *errors.Error
- func DefaultErrorInvalidParameter() *errors.Error
- func DefaultErrorKafka() *errors.Error
- func DefaultErrorLengthRequired() *errors.Error
- func DefaultErrorLocked() *errors.Error
- func DefaultErrorLoopDetected() *errors.Error
- func DefaultErrorMethodNotAllowed() *errors.Error
- func DefaultErrorMisdirectedRequest() *errors.Error
- func DefaultErrorMongo() *errors.Error
- func DefaultErrorMovedPermanently() *errors.Error
- func DefaultErrorMq() *errors.Error
- func DefaultErrorMultiStatus() *errors.Error
- func DefaultErrorMultipleChoices() *errors.Error
- func DefaultErrorMysql() *errors.Error
- func DefaultErrorNetworkAuthenticationRequired() *errors.Error
- func DefaultErrorNetworkError() *errors.Error
- func DefaultErrorNetworkTimeout() *errors.Error
- func DefaultErrorNoContent() *errors.Error
- func DefaultErrorNonAuthoritativeInfo() *errors.Error
- func DefaultErrorNotAcceptable() *errors.Error
- func DefaultErrorNotExtended() *errors.Error
- func DefaultErrorNotFound() *errors.Error
- func DefaultErrorNotImplemented() *errors.Error
- func DefaultErrorNotModified() *errors.Error
- func DefaultErrorOk() *errors.Error
- func DefaultErrorPanic() *errors.Error
- func DefaultErrorPartialContent() *errors.Error
- func DefaultErrorPaymentRequired() *errors.Error
- func DefaultErrorPermanentRedirect() *errors.Error
- func DefaultErrorPreconditionFailed() *errors.Error
- func DefaultErrorPreconditionRequired() *errors.Error
- func DefaultErrorProcessing() *errors.Error
- func DefaultErrorProxyAuthRequired() *errors.Error
- func DefaultErrorQueue() *errors.Error
- func DefaultErrorRabbitMq() *errors.Error
- func DefaultErrorRecordAlreadyExists() *errors.Error
- func DefaultErrorRecordNotFound() *errors.Error
- func DefaultErrorRedis() *errors.Error
- func DefaultErrorRequestEntityTooLarge() *errors.Error
- func DefaultErrorRequestFailed() *errors.Error
- func DefaultErrorRequestHeaderFieldsTooLarge() *errors.Error
- func DefaultErrorRequestNotSupport() *errors.Error
- func DefaultErrorRequestTimeout() *errors.Error
- func DefaultErrorRequestUriTooLong() *errors.Error
- func DefaultErrorRequestedRangeNotSatisfiable() *errors.Error
- func DefaultErrorResetContent() *errors.Error
- func DefaultErrorSeeOther() *errors.Error
- func DefaultErrorServiceUnavailable() *errors.Error
- func DefaultErrorSwitchingProtocols() *errors.Error
- func DefaultErrorTeapot() *errors.Error
- func DefaultErrorTemporaryRedirect() *errors.Error
- func DefaultErrorThirdPartyServiceInternalError() *errors.Error
- func DefaultErrorThirdPartyServiceInvalidCode() *errors.Error
- func DefaultErrorTooEarly() *errors.Error
- func DefaultErrorTooManyRequests() *errors.Error
- func DefaultErrorUnauthorized() *errors.Error
- func DefaultErrorUnavailableForLegalReasons() *errors.Error
- func DefaultErrorUnimplemented() *errors.Error
- func DefaultErrorUninitialized() *errors.Error
- func DefaultErrorUnknown() *errors.Error
- func DefaultErrorUnprocessableEntity() *errors.Error
- func DefaultErrorUnsupportedMediaType() *errors.Error
- func DefaultErrorUpgradeRequired() *errors.Error
- func DefaultErrorUseProxy() *errors.Error
- func DefaultErrorVariantAlsoNegotiates() *errors.Error
- func ErrMessage(key string) string
- func ErrorAccepted(format string, args ...interface{}) *errors.Error
- func ErrorAlreadyReported(format string, args ...interface{}) *errors.Error
- func ErrorBadGateway(format string, args ...interface{}) *errors.Error
- func ErrorBadRequest(format string, args ...interface{}) *errors.Error
- func ErrorCache(format string, args ...interface{}) *errors.Error
- func ErrorClientClose(format string, args ...interface{}) *errors.Error
- func ErrorConflict(format string, args ...interface{}) *errors.Error
- func ErrorConnectionError(format string, args ...interface{}) *errors.Error
- func ErrorContinue(format string, args ...interface{}) *errors.Error
- func ErrorCreated(format string, args ...interface{}) *errors.Error
- func ErrorDb(format string, args ...interface{}) *errors.Error
- func ErrorDuplicateKey(format string, args ...interface{}) *errors.Error
- func ErrorEarlyHints(format string, args ...interface{}) *errors.Error
- func ErrorEmpty306(format string, args ...interface{}) *errors.Error
- func ErrorExpectationFailed(format string, args ...interface{}) *errors.Error
- func ErrorFailedDependency(format string, args ...interface{}) *errors.Error
- func ErrorFatal(format string, args ...interface{}) *errors.Error
- func ErrorForbidden(format string, args ...interface{}) *errors.Error
- func ErrorFound(format string, args ...interface{}) *errors.Error
- func ErrorGatewayTimeout(format string, args ...interface{}) *errors.Error
- func ErrorGone(format string, args ...interface{}) *errors.Error
- func ErrorHttpVersionNotSupported(format string, args ...interface{}) *errors.Error
- func ErrorIMUsed(format string, args ...interface{}) *errors.Error
- func ErrorInsufficientStorage(format string, args ...interface{}) *errors.Error
- func ErrorInternalError(format string, args ...interface{}) *errors.Error
- func ErrorInternalServer(format string, args ...interface{}) *errors.Error
- func ErrorInvalidParameter(format string, args ...interface{}) *errors.Error
- func ErrorKafka(format string, args ...interface{}) *errors.Error
- func ErrorLengthRequired(format string, args ...interface{}) *errors.Error
- func ErrorLocked(format string, args ...interface{}) *errors.Error
- func ErrorLoopDetected(format string, args ...interface{}) *errors.Error
- func ErrorMethodNotAllowed(format string, args ...interface{}) *errors.Error
- func ErrorMisdirectedRequest(format string, args ...interface{}) *errors.Error
- func ErrorMongo(format string, args ...interface{}) *errors.Error
- func ErrorMovedPermanently(format string, args ...interface{}) *errors.Error
- func ErrorMq(format string, args ...interface{}) *errors.Error
- func ErrorMultiStatus(format string, args ...interface{}) *errors.Error
- func ErrorMultipleChoices(format string, args ...interface{}) *errors.Error
- func ErrorMysql(format string, args ...interface{}) *errors.Error
- func ErrorNetworkAuthenticationRequired(format string, args ...interface{}) *errors.Error
- func ErrorNetworkError(format string, args ...interface{}) *errors.Error
- func ErrorNetworkTimeout(format string, args ...interface{}) *errors.Error
- func ErrorNoContent(format string, args ...interface{}) *errors.Error
- func ErrorNonAuthoritativeInfo(format string, args ...interface{}) *errors.Error
- func ErrorNotAcceptable(format string, args ...interface{}) *errors.Error
- func ErrorNotExtended(format string, args ...interface{}) *errors.Error
- func ErrorNotFound(format string, args ...interface{}) *errors.Error
- func ErrorNotImplemented(format string, args ...interface{}) *errors.Error
- func ErrorNotModified(format string, args ...interface{}) *errors.Error
- func ErrorOk(format string, args ...interface{}) *errors.Error
- func ErrorPanic(format string, args ...interface{}) *errors.Error
- func ErrorPartialContent(format string, args ...interface{}) *errors.Error
- func ErrorPaymentRequired(format string, args ...interface{}) *errors.Error
- func ErrorPermanentRedirect(format string, args ...interface{}) *errors.Error
- func ErrorPreconditionFailed(format string, args ...interface{}) *errors.Error
- func ErrorPreconditionRequired(format string, args ...interface{}) *errors.Error
- func ErrorProcessing(format string, args ...interface{}) *errors.Error
- func ErrorProxyAuthRequired(format string, args ...interface{}) *errors.Error
- func ErrorQueue(format string, args ...interface{}) *errors.Error
- func ErrorRabbitMq(format string, args ...interface{}) *errors.Error
- func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error
- func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error
- func ErrorRedis(format string, args ...interface{}) *errors.Error
- func ErrorRequestEntityTooLarge(format string, args ...interface{}) *errors.Error
- func ErrorRequestFailed(format string, args ...interface{}) *errors.Error
- func ErrorRequestHeaderFieldsTooLarge(format string, args ...interface{}) *errors.Error
- func ErrorRequestNotSupport(format string, args ...interface{}) *errors.Error
- func ErrorRequestTimeout(format string, args ...interface{}) *errors.Error
- func ErrorRequestUriTooLong(format string, args ...interface{}) *errors.Error
- func ErrorRequestedRangeNotSatisfiable(format string, args ...interface{}) *errors.Error
- func ErrorResetContent(format string, args ...interface{}) *errors.Error
- func ErrorSeeOther(format string, args ...interface{}) *errors.Error
- func ErrorServiceUnavailable(format string, args ...interface{}) *errors.Error
- func ErrorSwitchingProtocols(format string, args ...interface{}) *errors.Error
- func ErrorTeapot(format string, args ...interface{}) *errors.Error
- func ErrorTemporaryRedirect(format string, args ...interface{}) *errors.Error
- func ErrorThirdPartyServiceInternalError(format string, args ...interface{}) *errors.Error
- func ErrorThirdPartyServiceInvalidCode(format string, args ...interface{}) *errors.Error
- func ErrorTooEarly(format string, args ...interface{}) *errors.Error
- func ErrorTooManyRequests(format string, args ...interface{}) *errors.Error
- func ErrorUnauthorized(format string, args ...interface{}) *errors.Error
- func ErrorUnavailableForLegalReasons(format string, args ...interface{}) *errors.Error
- func ErrorUnimplemented(format string, args ...interface{}) *errors.Error
- func ErrorUninitialized(format string, args ...interface{}) *errors.Error
- func ErrorUnknown(format string, args ...interface{}) *errors.Error
- func ErrorUnprocessableEntity(format string, args ...interface{}) *errors.Error
- func ErrorUnsupportedMediaType(format string, args ...interface{}) *errors.Error
- func ErrorUpgradeRequired(format string, args ...interface{}) *errors.Error
- func ErrorUseProxy(format string, args ...interface{}) *errors.Error
- func ErrorVariantAlsoNegotiates(format string, args ...interface{}) *errors.Error
- func FromError(err error) *errors.Error
- func Is(err, target error) bool
- func IsAccepted(err error) bool
- func IsAlreadyReported(err error) bool
- func IsBadGateway(err error) bool
- func IsBadRequest(err error) bool
- func IsCache(err error) bool
- func IsClientClose(err error) bool
- func IsCode(err error, code int) bool
- func IsConflict(err error) bool
- func IsConnectionError(err error) bool
- func IsContinue(err error) bool
- func IsCreated(err error) bool
- func IsCustomError(err error, enum Enum) bool
- func IsDb(err error) bool
- func IsDuplicateKey(err error) bool
- func IsEarlyHints(err error) bool
- func IsEmpty306(err error) bool
- func IsExpectationFailed(err error) bool
- func IsFailedDependency(err error) bool
- func IsFatal(err error) bool
- func IsForbidden(err error) bool
- func IsFound(err error) bool
- func IsGatewayTimeout(err error) bool
- func IsGone(err error) bool
- func IsHttpVersionNotSupported(err error) bool
- func IsIMUsed(err error) bool
- func IsInsufficientStorage(err error) bool
- func IsInternalError(err error) bool
- func IsInternalServer(err error) bool
- func IsInvalidParameter(err error) bool
- func IsKafka(err error) bool
- func IsLengthRequired(err error) bool
- func IsLocked(err error) bool
- func IsLoopDetected(err error) bool
- func IsMethodNotAllowed(err error) bool
- func IsMisdirectedRequest(err error) bool
- func IsMongo(err error) bool
- func IsMovedPermanently(err error) bool
- func IsMq(err error) bool
- func IsMultiStatus(err error) bool
- func IsMultipleChoices(err error) bool
- func IsMysql(err error) bool
- func IsNetworkAuthenticationRequired(err error) bool
- func IsNetworkError(err error) bool
- func IsNetworkTimeout(err error) bool
- func IsNoContent(err error) bool
- func IsNonAuthoritativeInfo(err error) bool
- func IsNotAcceptable(err error) bool
- func IsNotExtended(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplemented(err error) bool
- func IsNotModified(err error) bool
- func IsOk(err error) bool
- func IsPanic(err error) bool
- func IsPartialContent(err error) bool
- func IsPaymentRequired(err error) bool
- func IsPermanentRedirect(err error) bool
- func IsPreconditionFailed(err error) bool
- func IsPreconditionRequired(err error) bool
- func IsProcessing(err error) bool
- func IsProxyAuthRequired(err error) bool
- func IsQueue(err error) bool
- func IsRabbitMq(err error) bool
- func IsReason(err error, reason string) bool
- func IsRecordAlreadyExists(err error) bool
- func IsRecordNotFound(err error) bool
- func IsRedis(err error) bool
- func IsRequestEntityTooLarge(err error) bool
- func IsRequestFailed(err error) bool
- func IsRequestHeaderFieldsTooLarge(err error) bool
- func IsRequestNotSupport(err error) bool
- func IsRequestTimeout(err error) bool
- func IsRequestUriTooLong(err error) bool
- func IsRequestedRangeNotSatisfiable(err error) bool
- func IsResetContent(err error) bool
- func IsSeeOther(err error) bool
- func IsServiceUnavailable(err error) bool
- func IsSwitchingProtocols(err error) bool
- func IsTeapot(err error) bool
- func IsTemporaryRedirect(err error) bool
- func IsThirdPartyServiceInternalError(err error) bool
- func IsThirdPartyServiceInvalidCode(err error) bool
- func IsTooEarly(err error) bool
- func IsTooManyRequests(err error) bool
- func IsUnauthorized(err error) bool
- func IsUnavailableForLegalReasons(err error) bool
- func IsUnimplemented(err error) bool
- func IsUninitialized(err error) bool
- func IsUnknown(err error) bool
- func IsUnprocessableEntity(err error) bool
- func IsUnsupportedMediaType(err error) bool
- func IsUpgradeRequired(err error) bool
- func IsUseProxy(err error) bool
- func IsVariantAlsoNegotiates(err error) bool
- func Kvs(e *errors.Error, kvs ...string)
- func Message(err error) string
- func Metadata(err error) (metadata map[string]string, ok bool)
- func Println(err error)
- func Reason(err error) string
- func RecoverStack() string
- func Stack(err error) (callers []string)
- func WithKvs(e *errors.Error, kvs ...string)
- func WrapWithMetadata(e *errors.Error, md map[string]string) error
- type ERROR
- type Enum
- type Error
- func Err(e Enum, msg string) *Error
- func ErrWithMetadata(enum Enum, message string, md map[string]string) *Error
- func Errf(e Enum, format string, a ...interface{}) *Error
- func Errorf(code int, reason, format string, a ...interface{}) *Error
- func FormatError(err error) *Error
- func New(code int, reason, message string) *Error
- func NewWithMetadata(code int, reason, message string, md map[string]string) *Error
- func Newf(code int, reason, format string, a ...interface{}) *Error
- func WithStack(e *errors.Error) *Error
- func Wrap(e *errors.Error, eSlice ...error) *Error
- func WrapKvs(e *errors.Error, kvs ...string) *Error
- func (e *Error) Cause() error
- func (e *Error) Error() string
- func (e *Error) Format(s fmt.State, verb rune)
- func (e *Error) GetCode() int32
- func (e *Error) GetMessage() string
- func (e *Error) GetMetadata() map[string]string
- func (e *Error) GetMetadataReason() string
- func (e *Error) GetReason() string
- func (e *Error) Message() string
- func (e *Error) StackTrace() StackTrace
- type Frame
- type StackTrace
Examples ¶
Constants ¶
const ( EnumMDReasonKey = "reason" // 错误代码;例:100000001 EnumMDCauseKey = "cause" // 错误原因;例:链接错误 EnumMDErrorKey = "error" // 具体错误;例:db error )
Variables ¶
var ( ERROR_name = map[int32]string{ 0: "UNKNOWN", 10001: "REQUEST_FAILED", 10002: "RECORD_NOT_FOUND", 10003: "RECORD_ALREADY_EXISTS", 10004: "NETWORK_ERROR", 10005: "NETWORK_TIMEOUT", 10006: "CONNECTION_ERROR", 10007: "UNINITIALIZED", 10008: "UNIMPLEMENTED", 10009: "INVALID_PARAMETER", 10010: "REQUEST_NOT_SUPPORT", 10011: "INTERNAL_ERROR", 10012: "PANIC", 10013: "FATAL", 10014: "DUPLICATE_KEY", 11001: "DB", 11002: "MYSQL", 11003: "MONGO", 11004: "CACHE", 11005: "REDIS", 12001: "MQ", 12002: "QUEUE", 12003: "RABBIT_MQ", 12004: "KAFKA", 13002: "THIRD_PARTY_SERVICE_INVALID_CODE", 13001: "THIRD_PARTY_SERVICE_INTERNAL_ERROR", 100: "CONTINUE", 101: "SWITCHING_PROTOCOLS", 102: "PROCESSING", 103: "EARLY_HINTS", 200: "OK", 201: "CREATED", 202: "ACCEPTED", 203: "NON_AUTHORITATIVE_INFO", 204: "NO_CONTENT", 205: "RESET_CONTENT", 206: "PARTIAL_CONTENT", 207: "MULTI_STATUS", 208: "ALREADY_REPORTED", 226: "I_M_USED", 300: "MULTIPLE_CHOICES", 301: "MOVED_PERMANENTLY", 302: "FOUND", 303: "SEE_OTHER", 304: "NOT_MODIFIED", 305: "USE_PROXY", 306: "EMPTY306", 307: "TEMPORARY_REDIRECT", 308: "PERMANENT_REDIRECT", 400: "BAD_REQUEST", 401: "UNAUTHORIZED", 402: "PAYMENT_REQUIRED", 403: "FORBIDDEN", 404: "NOT_FOUND", 405: "METHOD_NOT_ALLOWED", 406: "NOT_ACCEPTABLE", 407: "PROXY_AUTH_REQUIRED", 408: "REQUEST_TIMEOUT", 409: "CONFLICT", 410: "GONE", 411: "LENGTH_REQUIRED", 412: "PRECONDITION_FAILED", 413: "REQUEST_ENTITY_TOO_LARGE", 414: "REQUEST_URI_TOO_LONG", 415: "UNSUPPORTED_MEDIA_TYPE", 416: "REQUESTED_RANGE_NOT_SATISFIABLE", 417: "EXPECTATION_FAILED", 418: "TEAPOT", 421: "MISDIRECTED_REQUEST", 422: "UNPROCESSABLE_ENTITY", 423: "LOCKED", 424: "FAILED_DEPENDENCY", 425: "TOO_EARLY", 426: "UPGRADE_REQUIRED", 428: "PRECONDITION_REQUIRED", 429: "TOO_MANY_REQUESTS", 431: "REQUEST_HEADER_FIELDS_TOO_LARGE", 451: "UNAVAILABLE_FOR_LEGAL_REASONS", 499: "CLIENT_CLOSE", 500: "INTERNAL_SERVER", 501: "NOT_IMPLEMENTED", 502: "BAD_GATEWAY", 503: "SERVICE_UNAVAILABLE", 504: "GATEWAY_TIMEOUT", 505: "HTTP_VERSION_NOT_SUPPORTED", 506: "VARIANT_ALSO_NEGOTIATES", 507: "INSUFFICIENT_STORAGE", 508: "LOOP_DETECTED", 510: "NOT_EXTENDED", 511: "NETWORK_AUTHENTICATION_REQUIRED", } ERROR_value = map[string]int32{ "UNKNOWN": 0, "REQUEST_FAILED": 10001, "RECORD_NOT_FOUND": 10002, "RECORD_ALREADY_EXISTS": 10003, "NETWORK_ERROR": 10004, "NETWORK_TIMEOUT": 10005, "CONNECTION_ERROR": 10006, "UNINITIALIZED": 10007, "UNIMPLEMENTED": 10008, "INVALID_PARAMETER": 10009, "REQUEST_NOT_SUPPORT": 10010, "INTERNAL_ERROR": 10011, "PANIC": 10012, "FATAL": 10013, "DUPLICATE_KEY": 10014, "DB": 11001, "MYSQL": 11002, "MONGO": 11003, "CACHE": 11004, "REDIS": 11005, "MQ": 12001, "QUEUE": 12002, "RABBIT_MQ": 12003, "KAFKA": 12004, "THIRD_PARTY_SERVICE_INVALID_CODE": 13002, "THIRD_PARTY_SERVICE_INTERNAL_ERROR": 13001, "CONTINUE": 100, "SWITCHING_PROTOCOLS": 101, "PROCESSING": 102, "EARLY_HINTS": 103, "OK": 200, "CREATED": 201, "ACCEPTED": 202, "NON_AUTHORITATIVE_INFO": 203, "NO_CONTENT": 204, "RESET_CONTENT": 205, "PARTIAL_CONTENT": 206, "MULTI_STATUS": 207, "ALREADY_REPORTED": 208, "I_M_USED": 226, "MULTIPLE_CHOICES": 300, "MOVED_PERMANENTLY": 301, "FOUND": 302, "SEE_OTHER": 303, "NOT_MODIFIED": 304, "USE_PROXY": 305, "EMPTY306": 306, "TEMPORARY_REDIRECT": 307, "PERMANENT_REDIRECT": 308, "BAD_REQUEST": 400, "UNAUTHORIZED": 401, "PAYMENT_REQUIRED": 402, "FORBIDDEN": 403, "NOT_FOUND": 404, "METHOD_NOT_ALLOWED": 405, "NOT_ACCEPTABLE": 406, "PROXY_AUTH_REQUIRED": 407, "REQUEST_TIMEOUT": 408, "CONFLICT": 409, "GONE": 410, "LENGTH_REQUIRED": 411, "PRECONDITION_FAILED": 412, "REQUEST_ENTITY_TOO_LARGE": 413, "REQUEST_URI_TOO_LONG": 414, "UNSUPPORTED_MEDIA_TYPE": 415, "REQUESTED_RANGE_NOT_SATISFIABLE": 416, "EXPECTATION_FAILED": 417, "TEAPOT": 418, "MISDIRECTED_REQUEST": 421, "UNPROCESSABLE_ENTITY": 422, "LOCKED": 423, "FAILED_DEPENDENCY": 424, "TOO_EARLY": 425, "UPGRADE_REQUIRED": 426, "PRECONDITION_REQUIRED": 428, "TOO_MANY_REQUESTS": 429, "REQUEST_HEADER_FIELDS_TOO_LARGE": 431, "UNAVAILABLE_FOR_LEGAL_REASONS": 451, "CLIENT_CLOSE": 499, "INTERNAL_SERVER": 500, "NOT_IMPLEMENTED": 501, "BAD_GATEWAY": 502, "SERVICE_UNAVAILABLE": 503, "GATEWAY_TIMEOUT": 504, "HTTP_VERSION_NOT_SUPPORTED": 505, "VARIANT_ALSO_NEGOTIATES": 506, "INSUFFICIENT_STORAGE": 507, "LOOP_DETECTED": 508, "NOT_EXTENDED": 510, "NETWORK_AUTHENTICATION_REQUIRED": 511, } )
Enum value maps for ERROR.
var (
// DefaultStackTracerDepth 错误追踪最深层数
DefaultStackTracerDepth = 6
)
var ERROR_http_code = map[string]int{
"UNKNOWN": 500,
"REQUEST_FAILED": 400,
"RECORD_NOT_FOUND": 404,
"RECORD_ALREADY_EXISTS": 400,
"NETWORK_ERROR": 500,
"NETWORK_TIMEOUT": 504,
"CONNECTION_ERROR": 500,
"UNINITIALIZED": 500,
"UNIMPLEMENTED": 500,
"INVALID_PARAMETER": 400,
"REQUEST_NOT_SUPPORT": 500,
"INTERNAL_ERROR": 500,
"PANIC": 500,
"FATAL": 500,
"DUPLICATE_KEY": 400,
"DB": 500,
"MYSQL": 500,
"MONGO": 500,
"CACHE": 500,
"REDIS": 500,
"MQ": 500,
"QUEUE": 500,
"RABBIT_MQ": 500,
"KAFKA": 500,
"THIRD_PARTY_SERVICE_INVALID_CODE": 400,
"THIRD_PARTY_SERVICE_INTERNAL_ERROR": 500,
"CONTINUE": 100,
"SWITCHING_PROTOCOLS": 101,
"PROCESSING": 102,
"EARLY_HINTS": 103,
"OK": 200,
"CREATED": 201,
"ACCEPTED": 202,
"NON_AUTHORITATIVE_INFO": 203,
"NO_CONTENT": 204,
"RESET_CONTENT": 205,
"PARTIAL_CONTENT": 206,
"MULTI_STATUS": 207,
"ALREADY_REPORTED": 208,
"I_M_USED": 226,
"MULTIPLE_CHOICES": 300,
"MOVED_PERMANENTLY": 301,
"FOUND": 302,
"SEE_OTHER": 303,
"NOT_MODIFIED": 304,
"USE_PROXY": 305,
"EMPTY306": 306,
"TEMPORARY_REDIRECT": 307,
"PERMANENT_REDIRECT": 308,
"BAD_REQUEST": 400,
"UNAUTHORIZED": 401,
"PAYMENT_REQUIRED": 402,
"FORBIDDEN": 403,
"NOT_FOUND": 404,
"METHOD_NOT_ALLOWED": 405,
"NOT_ACCEPTABLE": 406,
"PROXY_AUTH_REQUIRED": 407,
"REQUEST_TIMEOUT": 408,
"CONFLICT": 409,
"GONE": 410,
"LENGTH_REQUIRED": 411,
"PRECONDITION_FAILED": 412,
"REQUEST_ENTITY_TOO_LARGE": 413,
"REQUEST_URI_TOO_LONG": 414,
"UNSUPPORTED_MEDIA_TYPE": 415,
"REQUESTED_RANGE_NOT_SATISFIABLE": 416,
"EXPECTATION_FAILED": 417,
"TEAPOT": 418,
"MISDIRECTED_REQUEST": 421,
"UNPROCESSABLE_ENTITY": 422,
"LOCKED": 423,
"FAILED_DEPENDENCY": 424,
"TOO_EARLY": 425,
"UPGRADE_REQUIRED": 426,
"PRECONDITION_REQUIRED": 428,
"TOO_MANY_REQUESTS": 429,
"REQUEST_HEADER_FIELDS_TOO_LARGE": 431,
"UNAVAILABLE_FOR_LEGAL_REASONS": 451,
"CLIENT_CLOSE": 499,
"INTERNAL_SERVER": 500,
"NOT_IMPLEMENTED": 501,
"BAD_GATEWAY": 502,
"SERVICE_UNAVAILABLE": 503,
"GATEWAY_TIMEOUT": 504,
"HTTP_VERSION_NOT_SUPPORTED": 505,
"VARIANT_ALSO_NEGOTIATES": 506,
"INSUFFICIENT_STORAGE": 507,
"LOOP_DETECTED": 508,
"NOT_EXTENDED": 510,
"NETWORK_AUTHENTICATION_REQUIRED": 511,
}
var File_kratos_error_error_kit_proto protoreflect.FileDescriptor
Functions ¶
func CallStackWithSkipAndDepth ¶ added in v0.2.20
func CallerWithSkip ¶
CallerWithSkip 序列化调用者:file:line
func Cause ¶
Cause returns the underlying cause of the error
Example ¶
err := New(http.StatusNotFound, "StatusNotFound", "StatusNotFound") fmt.Println(Cause(err))
Output:
func Code ¶
Code returns the http code for a error.
Example ¶
err := New(http.StatusNotFound, "StatusNotFound", "StatusNotFound") fmt.Println(Code(err))
Output:
func DefaultErrorAccepted ¶ added in v0.2.17
func DefaultErrorAlreadyReported ¶ added in v0.2.17
func DefaultErrorBadGateway ¶ added in v0.2.17
func DefaultErrorBadRequest ¶ added in v0.2.17
BAD_REQUEST Bad Request
func DefaultErrorCache ¶ added in v0.2.17
func DefaultErrorClientClose ¶ added in v0.2.17
func DefaultErrorConflict ¶ added in v0.2.17
func DefaultErrorConnectionError ¶ added in v0.2.17
func DefaultErrorContinue ¶ added in v0.2.17
CONTINUE Continue
func DefaultErrorCreated ¶ added in v0.2.17
func DefaultErrorDuplicateKey ¶ added in v0.2.18
func DefaultErrorEarlyHints ¶ added in v0.2.17
func DefaultErrorEmpty306 ¶ added in v0.2.17
func DefaultErrorExpectationFailed ¶ added in v0.2.17
func DefaultErrorFailedDependency ¶ added in v0.2.17
func DefaultErrorFatal ¶ added in v0.2.17
func DefaultErrorForbidden ¶ added in v0.2.17
func DefaultErrorFound ¶ added in v0.2.17
func DefaultErrorGatewayTimeout ¶ added in v0.2.17
func DefaultErrorGone ¶ added in v0.2.17
func DefaultErrorHttpVersionNotSupported ¶ added in v0.2.17
func DefaultErrorIMUsed ¶ added in v0.2.17
func DefaultErrorInsufficientStorage ¶ added in v0.2.17
func DefaultErrorInternalError ¶ added in v0.2.17
func DefaultErrorInternalServer ¶ added in v0.2.17
INTERNAL_SERVER Internal Server Error
func DefaultErrorInvalidParameter ¶ added in v0.2.17
func DefaultErrorKafka ¶ added in v0.2.17
func DefaultErrorLengthRequired ¶ added in v0.2.17
func DefaultErrorLocked ¶ added in v0.2.17
func DefaultErrorLoopDetected ¶ added in v0.2.17
func DefaultErrorMethodNotAllowed ¶ added in v0.2.17
func DefaultErrorMisdirectedRequest ¶ added in v0.2.17
func DefaultErrorMongo ¶ added in v0.2.17
func DefaultErrorMovedPermanently ¶ added in v0.2.17
func DefaultErrorMultiStatus ¶ added in v0.2.17
func DefaultErrorMultipleChoices ¶ added in v0.2.17
MULTIPLE_CHOICES MultipleChoices
func DefaultErrorMysql ¶ added in v0.2.17
func DefaultErrorNetworkAuthenticationRequired ¶ added in v0.2.17
func DefaultErrorNetworkError ¶ added in v0.2.17
func DefaultErrorNetworkTimeout ¶ added in v0.2.17
func DefaultErrorNoContent ¶ added in v0.2.17
func DefaultErrorNonAuthoritativeInfo ¶ added in v0.2.17
func DefaultErrorNotAcceptable ¶ added in v0.2.17
func DefaultErrorNotExtended ¶ added in v0.2.17
func DefaultErrorNotFound ¶ added in v0.2.17
func DefaultErrorNotImplemented ¶ added in v0.2.17
func DefaultErrorNotModified ¶ added in v0.2.17
func DefaultErrorPanic ¶ added in v0.2.17
func DefaultErrorPartialContent ¶ added in v0.2.17
func DefaultErrorPaymentRequired ¶ added in v0.2.17
func DefaultErrorPermanentRedirect ¶ added in v0.2.17
func DefaultErrorPreconditionFailed ¶ added in v0.2.17
func DefaultErrorPreconditionRequired ¶ added in v0.2.17
func DefaultErrorProcessing ¶ added in v0.2.17
func DefaultErrorProxyAuthRequired ¶ added in v0.2.17
func DefaultErrorQueue ¶ added in v0.2.17
func DefaultErrorRabbitMq ¶ added in v0.2.17
func DefaultErrorRecordAlreadyExists ¶ added in v0.2.17
func DefaultErrorRecordNotFound ¶ added in v0.2.17
func DefaultErrorRedis ¶ added in v0.2.17
func DefaultErrorRequestEntityTooLarge ¶ added in v0.2.17
func DefaultErrorRequestFailed ¶ added in v0.2.17
func DefaultErrorRequestHeaderFieldsTooLarge ¶ added in v0.2.17
func DefaultErrorRequestNotSupport ¶ added in v0.2.17
func DefaultErrorRequestTimeout ¶ added in v0.2.17
func DefaultErrorRequestUriTooLong ¶ added in v0.2.17
func DefaultErrorRequestedRangeNotSatisfiable ¶ added in v0.2.17
func DefaultErrorResetContent ¶ added in v0.2.17
func DefaultErrorSeeOther ¶ added in v0.2.17
func DefaultErrorServiceUnavailable ¶ added in v0.2.17
func DefaultErrorSwitchingProtocols ¶ added in v0.2.17
func DefaultErrorTeapot ¶ added in v0.2.17
func DefaultErrorTemporaryRedirect ¶ added in v0.2.17
func DefaultErrorThirdPartyServiceInternalError ¶ added in v0.2.17
第三方服务错误
func DefaultErrorThirdPartyServiceInvalidCode ¶ added in v0.2.17
THIRD_PARTY_SERVICE_INVALID_CODE third party
func DefaultErrorTooEarly ¶ added in v0.2.17
func DefaultErrorTooManyRequests ¶ added in v0.2.17
func DefaultErrorUnauthorized ¶ added in v0.2.17
func DefaultErrorUnavailableForLegalReasons ¶ added in v0.2.17
func DefaultErrorUnimplemented ¶ added in v0.2.17
func DefaultErrorUninitialized ¶ added in v0.2.17
func DefaultErrorUnprocessableEntity ¶ added in v0.2.17
func DefaultErrorUnsupportedMediaType ¶ added in v0.2.17
func DefaultErrorUpgradeRequired ¶ added in v0.2.17
func DefaultErrorUseProxy ¶ added in v0.2.17
func DefaultErrorVariantAlsoNegotiates ¶ added in v0.2.17
func ErrorAccepted ¶
func ErrorAlreadyReported ¶
func ErrorBadGateway ¶
func ErrorBadRequest ¶
BAD_REQUEST Bad Request
func ErrorCache ¶
func ErrorClientClose ¶
func ErrorConflict ¶
func ErrorConnectionError ¶
func ErrorContinue ¶
CONTINUE Continue
func ErrorCreated ¶
func ErrorDuplicateKey ¶ added in v0.2.18
func ErrorEarlyHints ¶
func ErrorEmpty306 ¶
func ErrorExpectationFailed ¶
func ErrorFailedDependency ¶
func ErrorFatal ¶
func ErrorForbidden ¶
func ErrorFound ¶
func ErrorGatewayTimeout ¶
func ErrorIMUsed ¶
func ErrorInternalError ¶
func ErrorInternalServer ¶
INTERNAL_SERVER Internal Server Error
func ErrorInvalidParameter ¶
func ErrorKafka ¶
func ErrorLengthRequired ¶
func ErrorLocked ¶
func ErrorLoopDetected ¶
func ErrorMethodNotAllowed ¶
func ErrorMisdirectedRequest ¶
func ErrorMongo ¶
func ErrorMovedPermanently ¶
func ErrorMultiStatus ¶
func ErrorMultipleChoices ¶
MULTIPLE_CHOICES MultipleChoices
func ErrorMysql ¶
func ErrorNetworkError ¶
func ErrorNetworkTimeout ¶
func ErrorNoContent ¶
func ErrorNotAcceptable ¶
func ErrorNotExtended ¶
func ErrorNotFound ¶
func ErrorNotImplemented ¶
func ErrorNotModified ¶
func ErrorPanic ¶
func ErrorPartialContent ¶
func ErrorPaymentRequired ¶
func ErrorPermanentRedirect ¶
func ErrorPreconditionFailed ¶
func ErrorProcessing ¶
func ErrorProxyAuthRequired ¶
func ErrorQueue ¶
func ErrorRabbitMq ¶
func ErrorRecordNotFound ¶
func ErrorRedis ¶
func ErrorRequestFailed ¶
func ErrorRequestNotSupport ¶
func ErrorRequestTimeout ¶
func ErrorRequestUriTooLong ¶
func ErrorResetContent ¶
func ErrorSeeOther ¶
func ErrorServiceUnavailable ¶
func ErrorSwitchingProtocols ¶
func ErrorTeapot ¶
func ErrorTemporaryRedirect ¶
func ErrorThirdPartyServiceInternalError ¶
第三方服务错误
func ErrorThirdPartyServiceInvalidCode ¶
THIRD_PARTY_SERVICE_INVALID_CODE third party
func ErrorTooEarly ¶
func ErrorTooManyRequests ¶
func ErrorUnauthorized ¶
func ErrorUnimplemented ¶
func ErrorUninitialized ¶
func ErrorUpgradeRequired ¶
func ErrorUseProxy ¶
func FromError ¶
FromError try to convert an error to *errors.Error
Example ¶
err := New(http.StatusNotFound, "StatusNotFound", "StatusNotFound") cause := FromError(err) fmt.Println("error Code ", cause.Code) fmt.Println("error Reason ", cause.Reason) fmt.Println("error Message ", cause.Message) fmt.Println("error Metadata ", cause.Metadata)
Output:
func IsAccepted ¶
func IsAlreadyReported ¶
func IsBadGateway ¶
func IsClientClose ¶
func IsCode ¶
IsCode .
Example ¶
err := New(http.StatusNotFound, "StatusNotFound", "StatusNotFound") fmt.Println(IsCode(err, http.StatusNotFound))
Output:
func IsConflict ¶
func IsConnectionError ¶
func IsCustomError ¶ added in v0.3.14
func IsDuplicateKey ¶ added in v0.2.18
func IsEarlyHints ¶
func IsEmpty306 ¶
func IsExpectationFailed ¶
func IsFailedDependency ¶
func IsForbidden ¶
func IsGatewayTimeout ¶
func IsInsufficientStorage ¶
func IsInternalError ¶
func IsInvalidParameter ¶
func IsLengthRequired ¶
func IsLoopDetected ¶
func IsMethodNotAllowed ¶
func IsMisdirectedRequest ¶
func IsMovedPermanently ¶
func IsMultiStatus ¶
func IsNetworkError ¶
func IsNetworkTimeout ¶
func IsNoContent ¶
func IsNonAuthoritativeInfo ¶
func IsNotAcceptable ¶
func IsNotExtended ¶
func IsNotFound ¶
func IsNotImplemented ¶
func IsNotModified ¶
func IsPartialContent ¶
func IsPaymentRequired ¶
func IsPermanentRedirect ¶
func IsPreconditionFailed ¶
func IsPreconditionRequired ¶
func IsProcessing ¶
func IsProxyAuthRequired ¶
func IsRabbitMq ¶
func IsReason ¶
IsReason .
Example ¶
err := New(http.StatusNotFound, "StatusNotFound", "StatusNotFound") fmt.Println(IsReason(err, "StatusNotFound"))
Output:
func IsRecordAlreadyExists ¶
func IsRecordNotFound ¶
func IsRequestEntityTooLarge ¶
func IsRequestFailed ¶
func IsRequestNotSupport ¶
func IsRequestTimeout ¶
func IsRequestUriTooLong ¶
func IsResetContent ¶
func IsSeeOther ¶
func IsServiceUnavailable ¶
func IsSwitchingProtocols ¶
func IsTemporaryRedirect ¶
func IsThirdPartyServiceInternalError ¶
第三方服务错误
func IsThirdPartyServiceInvalidCode ¶
THIRD_PARTY_SERVICE_INVALID_CODE third party
func IsTooEarly ¶
func IsTooManyRequests ¶
func IsUnauthorized ¶
func IsUnimplemented ¶
func IsUninitialized ¶
func IsUnprocessableEntity ¶
func IsUnsupportedMediaType ¶
func IsUpgradeRequired ¶
func IsUseProxy ¶
func IsVariantAlsoNegotiates ¶
Types ¶
type ERROR ¶
type ERROR int32
ERROR .
const ( // UNKNOWN 常规 ERROR_UNKNOWN ERROR = 0 ERROR_REQUEST_FAILED ERROR = 10001 ERROR_RECORD_NOT_FOUND ERROR = 10002 ERROR_RECORD_ALREADY_EXISTS ERROR = 10003 ERROR_NETWORK_ERROR ERROR = 10004 ERROR_NETWORK_TIMEOUT ERROR = 10005 ERROR_CONNECTION_ERROR ERROR = 10006 ERROR_UNINITIALIZED ERROR = 10007 ERROR_UNIMPLEMENTED ERROR = 10008 ERROR_INVALID_PARAMETER ERROR = 10009 ERROR_REQUEST_NOT_SUPPORT ERROR = 10010 ERROR_INTERNAL_ERROR ERROR = 10011 ERROR_PANIC ERROR = 10012 ERROR_FATAL ERROR = 10013 ERROR_DUPLICATE_KEY ERROR = 10014 // DB database ERROR_DB ERROR = 11001 ERROR_MYSQL ERROR = 11002 ERROR_MONGO ERROR = 11003 ERROR_CACHE ERROR = 11004 ERROR_REDIS ERROR = 11005 // MQ message queue ERROR_MQ ERROR = 12001 ERROR_QUEUE ERROR = 12002 ERROR_RABBIT_MQ ERROR = 12003 ERROR_KAFKA ERROR = 12004 // THIRD_PARTY_SERVICE_INVALID_CODE third party ERROR_THIRD_PARTY_SERVICE_INVALID_CODE ERROR = 13002 // 第三方服务响应结果有误 ERROR_THIRD_PARTY_SERVICE_INTERNAL_ERROR ERROR = 13001 // 第三方服务错误 // CONTINUE Continue ERROR_CONTINUE ERROR = 100 ERROR_SWITCHING_PROTOCOLS ERROR = 101 ERROR_PROCESSING ERROR = 102 ERROR_EARLY_HINTS ERROR = 103 // OK OK ERROR_OK ERROR = 200 ERROR_CREATED ERROR = 201 ERROR_ACCEPTED ERROR = 202 ERROR_NON_AUTHORITATIVE_INFO ERROR = 203 ERROR_NO_CONTENT ERROR = 204 ERROR_RESET_CONTENT ERROR = 205 ERROR_PARTIAL_CONTENT ERROR = 206 ERROR_MULTI_STATUS ERROR = 207 ERROR_ALREADY_REPORTED ERROR = 208 ERROR_I_M_USED ERROR = 226 // MULTIPLE_CHOICES MultipleChoices ERROR_MULTIPLE_CHOICES ERROR = 300 ERROR_MOVED_PERMANENTLY ERROR = 301 ERROR_FOUND ERROR = 302 ERROR_SEE_OTHER ERROR = 303 ERROR_NOT_MODIFIED ERROR = 304 ERROR_USE_PROXY ERROR = 305 ERROR_EMPTY306 ERROR = 306 ERROR_TEMPORARY_REDIRECT ERROR = 307 ERROR_PERMANENT_REDIRECT ERROR = 308 // BAD_REQUEST Bad Request ERROR_BAD_REQUEST ERROR = 400 ERROR_UNAUTHORIZED ERROR = 401 ERROR_PAYMENT_REQUIRED ERROR = 402 ERROR_FORBIDDEN ERROR = 403 ERROR_NOT_FOUND ERROR = 404 ERROR_METHOD_NOT_ALLOWED ERROR = 405 ERROR_NOT_ACCEPTABLE ERROR = 406 ERROR_PROXY_AUTH_REQUIRED ERROR = 407 ERROR_REQUEST_TIMEOUT ERROR = 408 ERROR_CONFLICT ERROR = 409 ERROR_GONE ERROR = 410 ERROR_LENGTH_REQUIRED ERROR = 411 ERROR_PRECONDITION_FAILED ERROR = 412 ERROR_REQUEST_ENTITY_TOO_LARGE ERROR = 413 ERROR_REQUEST_URI_TOO_LONG ERROR = 414 ERROR_UNSUPPORTED_MEDIA_TYPE ERROR = 415 ERROR_REQUESTED_RANGE_NOT_SATISFIABLE ERROR = 416 ERROR_EXPECTATION_FAILED ERROR = 417 ERROR_TEAPOT ERROR = 418 ERROR_MISDIRECTED_REQUEST ERROR = 421 ERROR_UNPROCESSABLE_ENTITY ERROR = 422 ERROR_LOCKED ERROR = 423 ERROR_FAILED_DEPENDENCY ERROR = 424 ERROR_TOO_EARLY ERROR = 425 ERROR_UPGRADE_REQUIRED ERROR = 426 ERROR_PRECONDITION_REQUIRED ERROR = 428 ERROR_TOO_MANY_REQUESTS ERROR = 429 ERROR_REQUEST_HEADER_FIELDS_TOO_LARGE ERROR = 431 ERROR_UNAVAILABLE_FOR_LEGAL_REASONS ERROR = 451 ERROR_CLIENT_CLOSE ERROR = 499 // INTERNAL_SERVER Internal Server Error ERROR_INTERNAL_SERVER ERROR = 500 ERROR_NOT_IMPLEMENTED ERROR = 501 ERROR_BAD_GATEWAY ERROR = 502 ERROR_SERVICE_UNAVAILABLE ERROR = 503 ERROR_GATEWAY_TIMEOUT ERROR = 504 ERROR_HTTP_VERSION_NOT_SUPPORTED ERROR = 505 ERROR_VARIANT_ALSO_NEGOTIATES ERROR = 506 ERROR_INSUFFICIENT_STORAGE ERROR = 507 ERROR_LOOP_DETECTED ERROR = 508 ERROR_NOT_EXTENDED ERROR = 510 ERROR_NETWORK_AUTHENTICATION_REQUIRED ERROR = 511 )
func (ERROR) Descriptor ¶
func (ERROR) Descriptor() protoreflect.EnumDescriptor
func (ERROR) EnumDescriptor
deprecated
func (ERROR) Number ¶
func (x ERROR) Number() protoreflect.EnumNumber
func (ERROR) Type ¶
func (ERROR) Type() protoreflect.EnumType
type Enum ¶
type Enum interface { String() string Number() protoreflect.EnumNumber HTTPCode() int }
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error ...
func ErrWithMetadata ¶
ErrWithMetadata ...
func FormatError ¶ added in v0.3.14
func New ¶
New ...
Example ¶
err := New(http.StatusNotFound, "StatusNotFound", "StatusNotFound") fmt.Printf("%+v\n", err)
Output:
func NewWithMetadata ¶
NewWithMetadata ...
func (*Error) GetMessage ¶
func (*Error) GetMetadata ¶
func (*Error) GetMetadataReason ¶ added in v0.2.17
type Frame ¶
type Frame uintptr
Frame represents a program counter inside a stack frame. For historical reasons if Frame is interpreted as a uintptr its value represents the program counter + 1.
func (Frame) Format ¶
Format formats the frame according to the fmt.Formatter interface.
%s source file %d source line %n function name %v equivalent to %s:%d
Format accepts flags that alter the printing of some verbs, as follows:
%+s function name and path of source file relative to the compile time GOPATH separated by \n\t (<funcname>\n\t<path>) %+v equivalent to %+s:%d
func (Frame) MarshalText ¶
MarshalText formats a stacktrace Frame as a text string. The output is the same as that of fmt.Sprintf("%+v", f), but without newlines or tabs.
type StackTrace ¶
type StackTrace []Frame
StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
func (StackTrace) Format ¶
func (st StackTrace) Format(s fmt.State, verb rune)
Format formats the stack of Frames according to the fmt.Formatter interface.
%s lists source files for each Frame in the stack %v lists the source file and line number for each Frame in the stack
Format accepts flags that alter the printing of some verbs, as follows:
%+v Prints filename, function, and line number for each Frame in the stack.