failure

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package failure lists all the possible errors that can be returned either by `protein` or any of its sub-packages.

Protein uses the pkg/errors1 package to handle error propagation throughout the call stack; please take a look at the related documentation for more information on how to properly handle these errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsProteinError

func IsProteinError(err error) bool

IsProteinError returns true if `err` originates from this package.

Types

type Error

type Error int

Error is an error returned either by `protein` or any of its sub-packages.

Use `IsProteinError(err)` to know whether or not an error originates from this package.

const (
	/* Common */
	ErrUnknown            Error = iota // unknown error
	ErrSchemaNotFound     Error = iota // schema's UID not found
	ErrDependencyNotFound Error = iota // dependency's UID not found

	/* Protostruct */
	ErrSchemaNotMessageType   Error = iota // schema is not of messsage type
	ErrFieldTypeNotSupported  Error = iota // field type not supported
	ErrFieldLabelNotSupported Error = iota // field label not supported

	/* Protoscan */
	ErrFDAlreadyInstanciated Error = iota // proto-file-descriptor instanciated multiple times
	ErrFDUnknownType         Error = iota // proto-file-descriptor is of unknown type
	ErrFDMissingDependency   Error = iota // proto-file-descriptor depends on missing schemas
)

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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