ShellCommandException
- Type
- Final Class
- Namespace
- craft\errors
- Inherits
- craft\errors\ShellCommandException » yii\base\Exception (opens new window) » Exception (opens new window)
- Since
- 3.0.0
ShellCommandException represents an exception caused by setting an invalid license key on a plugin.
View source (opens new window)
# Public Properties
Property | Description |
---|---|
command | string (opens new window) – The command that was executed |
error | string (opens new window), null (opens new window) – The command’s error output |
exitCode | integer (opens new window) – The command’s exit code |
# command
- Type
- string (opens new window)
- Default value
null
The command that was executed
View source (opens new window)
# error
- Type
- string (opens new window), null (opens new window)
- Default value
null
The command’s error output
View source (opens new window)
# exitCode
- Type
- integer (opens new window)
- Default value
null
The command’s exit code
View source (opens new window)
# Public Methods
Method | Description |
---|---|
__construct() | Constructor. |
createFromCommand() | Creates a ShellCommandException from a \mikehaertl\shellcommand\Command object |
getName() |
# __construct()
Constructor.
View source (opens new window)
Arguments
$command
(string (opens new window)) – The command that was executed$exitCode
(integer (opens new window)) – The command’s exit code$error
(string (opens new window), null (opens new window)) – The command’s error output$message
(string (opens new window), null (opens new window)) – The error message$code
(integer (opens new window)) – The error code
# createFromCommand()
Creates a ShellCommandException from a \mikehaertl\shellcommand\Command
object
View source (opens new window)
Arguments
$command
(\mikehaertl\shellcommand\Command
) – The failed Command object
Returns
static
, false (opens new window)
# getName()
View source (opens new window)
Returns
string (opens new window) – The user-friendly name of this exception