generic
CustomException
dataclass
Bases: CustomExceptionBase
A generic Exception.
Description: This object can store arbitrary types in one of 2 extra fields:
- errors
- extra
errors is meant to store an error/a list of errors.
extra is meant to store any non-message, non-error data with the exception. This could be a class
object, a dict, or some other form of arbitrary data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg |
str
|
A message to display with the exception. |
field(default='Custom exception called')
|
errors |
Any
|
Property to store arbitrary data. Meant to be used for errors associated with the exception. |
field(default=None)
|
extra |
Any
|
Property to store arbitrary data. Data stored in this property can be a Python object (i.e. a class instance, dict, str, or other), a list of objects/strings, etc. |
field(default=None)
|