Raised when an external command exits unsuccessfully.
More...
Raised when an external command exits unsuccessfully.
Definition at line 8527 of file core.py.
◆ __init__()
| picurv_cli.core.CommandExecutionError.__init__ |
( |
|
self, |
|
|
list |
command, |
|
|
int |
returncode, |
|
|
str |
details = None |
|
) |
| |
Initialize a command execution error.
- Parameters
-
| [in] | command | Argument passed to __init__(). |
| [in] | returncode | Argument passed to __init__(). |
| [in] | details | Argument passed to __init__(). |
Definition at line 8532 of file core.py.
8532 def __init__(self, command: list, returncode: int, details: str = None):
8533 """!
8534 @brief Initialize a command execution error.
8535 @param[in] command Argument passed to `__init__()`.
8536 @param[in] returncode Argument passed to `__init__()`.
8537 @param[in] details Argument passed to `__init__()`.
8538 """
8539 self.command = command
8540 self.returncode = returncode
8541 self.details = details
8542 detail_suffix = f": {details}" if details else ""
8543 super().__init__(
8544 f"Command failed with exit code {returncode}: {format_command_for_display(command)}{detail_suffix}"
8545 )
8546
8547
◆ command
| picurv_cli.core.CommandExecutionError.command |
◆ returncode
| picurv_cli.core.CommandExecutionError.returncode |
◆ details
| picurv_cli.core.CommandExecutionError.details |
The documentation for this class was generated from the following file: