drpcerr

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 0 Imported by: 58

README

package drpcerr

import "storj.io/drpc/drpcerr"

package drpcerr lets one associate error codes with errors.

Usage

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

This section is empty.

Variables

This section is empty.

Functions

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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