PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
picurv_cli.core.CommandExecutionError Class Reference

Raised when an external command exits unsuccessfully. More...

Inheritance diagram for picurv_cli.core.CommandExecutionError:
[legend]
Collaboration diagram for picurv_cli.core.CommandExecutionError:
[legend]

Public Member Functions

 __init__ (self, list command, int returncode, str details=None)
 Initialize a command execution error.
 

Data Fields

 command
 
 returncode
 
 details
 

Detailed Description

Raised when an external command exits unsuccessfully.

Definition at line 17422 of file core.py.

Constructor & Destructor Documentation

◆ __init__()

picurv_cli.core.CommandExecutionError.__init__ (   self,
list  command,
int  returncode,
str   details = None 
)

Initialize a command execution error.

Parameters
[in]commandArgument passed to __init__().
[in]returncodeArgument passed to __init__().
[in]detailsArgument passed to __init__().

Definition at line 17427 of file core.py.

17427 def __init__(self, command: list, returncode: int, details: str = None):
17428 """!
17429 @brief Initialize a command execution error.
17430 @param[in] command Argument passed to `__init__()`.
17431 @param[in] returncode Argument passed to `__init__()`.
17432 @param[in] details Argument passed to `__init__()`.
17433 """
17434 self.command = command
17435 self.returncode = returncode
17436 self.details = details
17437 detail_suffix = f": {details}" if details else ""
17438 super().__init__(
17439 f"Command failed with exit code {returncode}: {format_command_for_display(command)}{detail_suffix}"
17440 )
17441
17442

Field Documentation

◆ command

picurv_cli.core.CommandExecutionError.command

Definition at line 17434 of file core.py.

◆ returncode

picurv_cli.core.CommandExecutionError.returncode

Definition at line 17435 of file core.py.

◆ details

picurv_cli.core.CommandExecutionError.details

Definition at line 17436 of file core.py.


The documentation for this class was generated from the following file: