Documentation
¶
Overview ¶
Package runfailure maps the error a ZapScript run ends with onto the stable category and safe message every client-facing report of that run shares: the run method's error response and the run.failed notification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Classify ¶
Classify returns the category and message for a terminal run error. The message never carries a filesystem path or token contents; the cause stays with the caller for logging and errors.Is.
func Notify ¶
Notify sends run.failed for a run of t that ended with err. pls is the playlist the run was an item of, or nil. The script is the token's own text, redacted as token history stores it; a token that carries parsed commands instead of text reports those. A script over the length bound is left out: it was never run, and redacting it would mean parsing it.
Types ¶
type CommandError ¶
CommandError is the failure of one command in a script. It names the command so a report of the run can say which step failed, and unwraps to the cause so errors.Is keeps matching the sentinels.
func (*CommandError) Error ¶
func (e *CommandError) Error() string
func (*CommandError) Unwrap ¶
func (e *CommandError) Unwrap() error