Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

doc: fix words about TerminalError #65

Merged
merged 1 commit into from
Apr 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ import (
)

// TerminalError is a standard error interface. For fallible injectors,
// TerminalError must one of the return values.
// TerminalError must be one of the return values.
//
// A non-nil return value terminates the handler call chain. The
// TerminalError return value gets converted to a regular error value
// TerminalError return value gets converted to a regular error value (type=error)
// and (like other return values) it must be consumed by an upstream handler
// or the invoke function.
// or the invoke function. Essentially marking an error return as a TerminalError
// causes special behavior but the effective type is just error.
//
// Functions that return TerminalError do count as having no outputs and
// Functions that return just TerminalError count as having no outputs and
// thus they are treated as specially required if they're in the RUN set.
//
// Note: wrapper functions should not return TerminalError because such
Expand Down