Documentation
¶
Overview ¶
Copied from pipe-fittings/error_helpers.go. We handle cancellation differently: cancellations are a user choice, so we don't throw an error (normalized to "execution cancelled").
Index ¶
- func FailOnError(err error)
- func FailOnErrorWithMessage(err error, message string)
- func GetWarningOutputStream() io.Writer
- func IsCancelledError(err error) bool
- func IsMachineReadableOutput() bool
- func PrefixError(err error, prefix string) error
- func ShowError(ctx context.Context, err error)
- func ShowErrorWithMessage(ctx context.Context, err error, message string)
- func ShowInfo(info string)
- func ShowWarning(warning string)
- func TransformErrorToTailpipe(err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailOnError ¶
func FailOnError(err error)
func FailOnErrorWithMessage ¶
func GetWarningOutputStream ¶
func IsCancelledError ¶
func IsMachineReadableOutput ¶
func IsMachineReadableOutput() bool
IsMachineReadableOutput checks if the current output format is machine readable (CSV or JSON)
func PrefixError ¶
func ShowErrorWithMessage ¶
ShowErrorWithMessage displays the given error nicely with the given message
func ShowInfo ¶
func ShowInfo(info string)
ShowInfo prints a non-critical info message to the appropriate output stream. Behaves like ShowWarning but with a calmer label (Note) to avoid alarming users for successful outcomes or informational messages.
func ShowWarning ¶
func ShowWarning(warning string)
func TransformErrorToTailpipe ¶
TransformErrorToTailpipe removes the pq: and rpc error prefixes along with all the unnecessary information that comes from the drivers and libraries
Types ¶
This section is empty.