End
Command: end
Description: End the pipeline immediately, returning the working text as-is.
Notes
Removes all subsequent commands from the queue, so this effectively becomes the last command. Exists cleanly, returns whatever the working text is at the time, and completes all finalization activities.
This is the "clean" exit, as opposed to abort.
This is normally only used to encapulate label blocks when doing error handling.
http -url:https://domain.com/some/path
# If this throws an error, it will look for "http-error" then "error" if that's not found
end
label -name:http-error
set -text:"An HTTP error occured."
end
label -name:error
set -text:"An error occured."
end
Source Code
function end(working, command, p) {
working.end = true;
return working.text;
}
end.title = "End";
end.description =
"End the pipeline immediately, returning the working text as-is.";
end.args = [];
end.passthrough = true;
export default end;