Skip to content

[bug] Improper implementation of click causes errors while handling exceptions #232

@nikochiko

Description

@nikochiko

Current behavior:
While displaying the errors, click.style is being called on the errors to make the colors consistent. However, this implementation is not correct as click.style does not support an Exception as an argument, hence it raises an error on its own. See this snap:
cli-bug-error-formatting

Expected:
The error message should be displayed. Like:
cli-bug-working


Another option to still retain the styling and colors is to call str() on the errors first.
i.e.

echo(style(str(exception), ... ))

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