busywork

package
v0.6.0-preview Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

README

The Go busywork package

Currently not much here, other than some infrastructire that allows a busywork application to effectively "throw exceptions" rather than verbosely/redundantly passing irrecoverable errors up the stack.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catch

func Catch(err *error)

Catch catches irrecoverable errors in busywork applications. This function must be called "deferred" from a function that returns an error. In the event of a busywork panic the input error will be assigned to a new error containing the panic message.

func SizeOfInt

func SizeOfInt() int

SizeOfInt computes the size of an integer in bytes

func Throw

func Throw(format string, args ...interface{})

Throw signals an irrecoverable error as a formatted string

Types

type IrrecoverableError

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

IrrecoverableError is a special object used to signal busywork irrecoverable errors as panics.

Jump to

Keyboard shortcuts

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