errors

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright © 2021 Optable Technologies Inc. All rights reserved. See LICENSE for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrors

func NewErrors(errs ...error) error

func NewPositionalError

func NewPositionalError(pos int, err error) error

NewPositionalError creates an error paired with a position.

Types

type Errors

type Errors struct {
	// contains filtered or unexported fields
}

Errors is an error that wrap two or more errors. The downside of batching many errors is that unwrap will only return the first error. Use the `Errors` method to extract all errors.

func (*Errors) Error

func (e *Errors) Error() string

func (*Errors) Errors

func (e *Errors) Errors() []error

func (*Errors) Unwrap

func (e *Errors) Unwrap() error

type PositionalError

type PositionalError struct {
	// contains filtered or unexported fields
}

PositionalError is an error paired with a position. This is useful for APIs that perform bulk operations that can partially fail and the caller must bind which input(s) failed. Use the `Position` method to extract the position.

func (*PositionalError) Error

func (e *PositionalError) Error() string

func (*PositionalError) Position

func (e *PositionalError) Position() int

func (*PositionalError) Unwrap

func (e *PositionalError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL