Skip to content

Explicitly document how best to exit/abort a task w/o a traceback #481

@pfmoore

Description

@pfmoore

I'm not sure what is the best way to report failure in a task. I can raise an exception, but if I do that the main program produces a fairly unfriendly traceback for the user. I can simply print a message and exit the task, but if I do that presumably other tasks specified on the command line, or as post-tasks, will run, and I'd expect a "proper" task failure to abort the whole run.

I've checked the documentation, but there's not actually a huge amount I can see on how to write a task definition. Most of it's simply standard Python, so I guess that's fine, but if I've missed something I apologise.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions