Derived from the tryceratops linter.
What it does#
Checks for long exception messages that are not defined in the exception class itself.
Why is this bad?#
By formatting an exception message at the
raise site, the exception class
becomes less reusable, and may now raise inconsistent messages depending on
where it is raised.
If the exception message is instead defined within the exception class, it
will be consistent across all
This rule is not enforced for some built-in exceptions that are commonly
raised with a message and would be unusual to subclass, such as