README
¶
package drpcerr
import "storj.io/drpc/drpcerr"
Package drpcerr lets one associate error codes with errors.
Usage
const (
// Unimplemented is the code used by the generated unimplemented
// servers when returning errors.
Unimplemented = 12
)
func Code
func Code(err error) uint64
Code returns the error code associated with the error or 0 if none is.
func WithCode
func WithCode(err error, code uint64) error
WithCode associates the code with the error if it is non nil and the code is non-zero.
Documentation
¶
Overview ¶
Package drpcerr lets one associate error codes with errors.
Index ¶
Constants ¶
View Source
const ( // Unimplemented is the code used by the generated unimplemented // servers when returning errors. Unimplemented = 12 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.