Categorygithub.com/koki/structurederrors
modulepackage
0.0.0-20180506174113-6b997eb5e2ca
Repository: https://github.com/koki/structurederrors.git
Documentation: pkg.go.dev

# README

structurederrors

Errors with context and other structured information

Errors in Golang lose context when one error leads to the calling function throwing an error, and its calling function throwing another error and so on.

Throwing errors using the functions provided in this library allow the user to capture the cascade of errors that are thrown.

# Functions

ContextualizeErrorf is for adding an additional message to an existing error.
No description provided by the author
InvalidInstanceContextErrorf is like InvalidInstanceContextErrorf, except it adds its message as context to an existing error.
InvalidInstanceError means that obj is the correct type, but there's something wrong with its contents.
InvalidInstanceErrorf is like InvalidInstanceError, except with a custom message.
No description provided by the author
InvalidValueErrorf is used when the type isn't meaningful--just the contents and the context matter.
No description provided by the author
No description provided by the author
InvalidValueForTypeError is used when the type isn't meaningful--just the contents and the context matter.
InvalidValueForTypeErrorf is used when the type isn't meaningful--just the contents and the context matter.
No description provided by the author
No description provided by the author
No description provided by the author
TypeContextErrorf is like TypeErrorf, but it adds its message as context to an existing error.
TypeError means that obj has an unexpected type.
TypeErrorf is like TypeError, except with a custom message.
No description provided by the author

# Structs

No description provided by the author