CommandError
Exception class indicating a problem while executing a management command.
Attributes
| Attribute | Type | Description |
|---|---|---|
| returncode | int = 1 | The exit code to be returned by the process when this exception is caught, defaulting to 1. |
Constructor
Signature
def CommandError(
*args: tuple,
returncode: int = 1,
**kwargs: dict
)
Parameters
| Name | Type | Description |
|---|---|---|
| *args | tuple | Variable length argument list passed to the base Exception class. |
| returncode | int = 1 | The exit code to be returned by the command execution. |
| **kwargs | dict | Arbitrary keyword arguments passed to the base Exception class. |
Signature
def CommandError(
*args: any,
returncode: int = 1,
**kwargs: any
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | Positional arguments passed to the Exception base class, typically containing the error message string. |
| returncode | int = 1 | The numeric exit code to be returned by the process when this error occurs. |
| **kwargs | any | Arbitrary keyword arguments passed to the Exception base class. |