Documentation ¶
Overview ¶
Package errors is a drop-in replacement for Golang lib 'errors'.
Index ¶
- func AllEqual(expected error, actual error) bool
- func Cause(err error) error
- func Combine(maybeError ...error) error
- func GetSeverity(err error) log.Severity
- func LogDebug(ctx context.Context, msg ...interface{})
- func LogDebugInner(ctx context.Context, inner error, msg ...interface{})
- func LogError(ctx context.Context, msg ...interface{})
- func LogErrorInner(ctx context.Context, inner error, msg ...interface{})
- func LogInfo(ctx context.Context, msg ...interface{})
- func LogInfoInner(ctx context.Context, inner error, msg ...interface{})
- func LogWarning(ctx context.Context, msg ...interface{})
- func LogWarningInner(ctx context.Context, inner error, msg ...interface{})
- func PrintDeprecatedFeatureWarning(feature string, migrateFeature string)
- func PrintMigrateFeatureInfo(sourceFeature string, targetFeature string)
- func PrintRemovedFeatureError(feature string, migrateFeature string) error
- type Error
- func (err *Error) AtDebug() *Error
- func (err *Error) AtError() *Error
- func (err *Error) AtInfo() *Error
- func (err *Error) AtWarning() *Error
- func (err *Error) Base(e error) *Error
- func (err *Error) Error() string
- func (err *Error) Severity() log.Severity
- func (err *Error) String() string
- func (err *Error) Unwrap() error
- type ExportOption
- type ExportOptionHolder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSeverity ¶
GetSeverity returns the actual severity of the error, including inner errors.
func LogDebugInner ¶
func LogErrorInner ¶
func LogInfoInner ¶
func LogWarning ¶
func LogWarningInner ¶
func PrintDeprecatedFeatureWarning ¶
PrintDeprecatedFeatureWarning prints a warning for deprecated and going to be removed feature. Do not remove this function even there is no reference to it.
func PrintMigrateFeatureInfo ¶
PrintMigrateFeatureInfo prints a notice of the upcoming feature migration. Place it after the source feature related config file pharser code. Important note: Only use this when the target migrating feature is under construction. Important note: Even when the target migrating feature has finished its construction, this notice can still be used yet before announcing deprecation of the old feature. Do not remove this function even there is no reference to it.
func PrintRemovedFeatureError ¶
PrintRemovedFeatureError prints an error message for removed feature then return an error. And after long enough time the message can also be removed, uses as an indicator. Do not remove this function even there is no reference to it.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is an error object with underlying error.
func New ¶
func New(msg ...interface{}) *Error
New returns a new error object with message formed from given arguments.
type ExportOption ¶
type ExportOption func(*ExportOptionHolder)
type ExportOptionHolder ¶
type ExportOptionHolder struct {
SessionID uint32
}