create_exception_cls
Dynamically create an exception class.
def create_exception_cls(
name: string,
module: string,
parent: type = null
) - > type
Dynamically create an exception class.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The name of the new exception class to be created |
| module | string | The name of the module to which the new exception class will belong |
| parent | type = null | The base exception class to inherit from; defaults to the built-in Exception class if not provided |
Returns
| Type | Description |
|---|---|
type | A new exception class derived from the specified parent and associated with the given module |