Skip to content

Replace fatal() Python function with exception #65

@duncanmmacleod

Description

@duncanmmacleod

In hgettoken.py the fatal() function prints a message before halting execution with a non-zero exit code (via sys.exit), is there any objection to (me) refactoring calls to this function to instead raise standard Python exception types?

The impact on the standard command-line execution would be that a traceback is printed (currently that is not printed).

IMO, this will greatly assist the planned Python interface by providing an interface for users to catch exceptions and handle them in a bespoke manner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions