MCPcopy
hub / github.com/django/django / CommandError

Class CommandError

django/core/management/base.py:23–38  ·  view source on GitHub ↗

Exception class indicating a problem while executing a management command. If this exception is raised during the execution of a management command, it will be caught and turned into a nicely-printed error message to the appropriate output stream (i.e., stderr); as a result

Source from the content-addressed store, hash-verified

21
22
23class CommandError(Exception):
24 """
25 Exception class indicating a problem while executing a management
26 command.
27
28 If this exception is raised during the execution of a management
29 command, it will be caught and turned into a nicely-printed error
30 message to the appropriate output stream (i.e., stderr); as a
31 result, raising this exception (with a sensible description of the
32 error) is the preferred way to indicate that something has gone
33 wrong in the execution of a command.
34 """
35
36 def __init__(self, *args, returncode=1, **kwargs):
37 self.returncode = returncode
38 super().__init__(*args, **kwargs)
39
40
41class SystemCheckError(CommandError):

Callers 15

handleMethod · 0.90
collectMethod · 0.90
handleMethod · 0.90
link_fileMethod · 0.90
add_argumentsMethod · 0.90
handleMethod · 0.90
_get_passMethod · 0.90
handleMethod · 0.90
handleMethod · 0.90
handleMethod · 0.90
handle_templateMethod · 0.90
validate_nameMethod · 0.90

Calls

no outgoing calls

Tested by 1

raise_command_errorMethod · 0.72