Documentation ¶
Overview ¶
Package exc provides an error type for capnp exceptions.
Index ¶
- func IsType(err error, t Type) bool
- func WrapError(prefix string, err error) error
- type Annotator
- func (f Annotator) Annotate(err error, msg string) *Exception
- func (f Annotator) Disconnected(err error) *Exception
- func (f Annotator) Failed(err error) *Exception
- func (f Annotator) New(t Type, err error) *Exception
- func (f Annotator) Unimplemented(err error) *Exception
- func (f Annotator) WrapDisconnected(msg string, err error) *Exception
- func (f Annotator) WrapFailed(msg string, err error) *Exception
- func (f Annotator) WrapUnimplemented(msg string, err error) *Exception
- type Exception
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Annotator ¶
type Annotator string
func (Annotator) Disconnected ¶
func (Annotator) Unimplemented ¶
func (Annotator) WrapDisconnected ¶
type Exception ¶
Exception is an error that designates a Cap'n Proto exception.
func Annotate ¶
Annotate creates a new error that formats as "<prefix>: <msg>: <err>". If err has the same prefix, then the prefix won't be duplicated. The returned error's type will match err's type.
func New ¶
New creates a new error that formats as "<prefix>: <msg>". The type can be recovered using the TypeOf() function.
type Type ¶
type Type int
Type indicates the type of error, mirroring those in rpc.capnp.
Error types.
Click to show internal directories.
Click to hide internal directories.