Skip to content

PendulumException should derive from Exception instead of BaseException #215

@jgaffiot

Description

@jgaffiot

Hi,

as is stated in the official documentation:

programmers are encouraged to derive new exceptions from the Exception class or one of its subclasses, and not from BaseException

The rational is discussed in PEP352 or this StackOverflow discussion.

Moreover, I think most programmers (at least me!) expect that all errors are caught in a except Exception block, which is currently not the case, you have to:

except (Exception, pendulum.exceptions.PendulumException):

to be sure to catch everything but the system exit, keyboard interrupt...
Perhaps it's still time for v2 ?

Best regards and thanks for the amazing library!

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