chicken_turtle_util.exceptions¶
Exception classes: UserException and InvalidOperationError.
If you miss the ability to pass args to any of these exceptions, note that you actually can. For example:
>>> ex = Exception(1, 2, 3)
>>> ex.args
(1, 2, 3)
You can only use positional arguments though.
exc_info |
Get exc_info tuple from exception |
InvalidOperationError |
When an operation is illegal/invalid (in the current state), regardless of what arguments you throw at it. |
UserException |
Exception with message to show the user. |
-
exception
chicken_turtle_util.exceptions.
InvalidOperationError
[source]¶ When an operation is illegal/invalid (in the current state), regardless of what arguments you throw at it.
An operation is a method/function call, the getting or setting of an attribute.
When the issue is with an argument, use ValueError, not this.