Skip to content

Commit

Permalink
doc: fix words about TerminalError (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
muir authored Apr 15, 2023
1 parent b7fb35f commit 2586205
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 2586205

Please sign in to comment.