Documentation ¶
Overview ¶
Package errext contains extensions for normal Go errors that are used in k6.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithExitCodeIfNone ¶
WithExitCodeIfNone can attach an exit code to the given error, if it doesn't have one already. It won't do anything if the error already had an exit code attached. Similarly, if there is no error (i.e. the given error is nil), it also won't do anything.
Types ¶
type Exception ¶
Exception represents errors that resulted from a script exception and contain a stack trace that lead to them.
type ExitCode ¶
type ExitCode uint8
ExitCode is the code with which the application should exit if this error bubbles up to the top of the scope. Values should be between 0 and 125: https://unix.stackexchange.com/questions/418784/what-is-the-min-and-max-values-of-exit-codes-in-linux
type HasExitCode ¶
HasExitCode is a wrapper around an error with an attached exit code.