Skip to main content

CommandError

Exception class indicating a problem while executing a management command.

Attributes

AttributeTypeDescription
returncodeint = 1The 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

NameTypeDescription
*argstupleVariable length argument list passed to the base Exception class.
returncodeint = 1The exit code to be returned by the command execution.
**kwargsdictArbitrary keyword arguments passed to the base Exception class.

Signature

def CommandError(
*args: any,
returncode: int = 1,
**kwargs: any
) - > null

Parameters

NameTypeDescription
*argsanyPositional arguments passed to the Exception base class, typically containing the error message string.
returncodeint = 1The numeric exit code to be returned by the process when this error occurs.
**kwargsanyArbitrary keyword arguments passed to the Exception base class.