Skip to content

ShellCommandException ​

Type
Final Class
Namespace
craft\errors
Inherits
craft\errors\ShellCommandException » yii\base\Exception » Exception
Since
3.0.0

ShellCommandException represents an exception caused by setting an invalid license key on a plugin.

View source

Public Properties ​

PropertyDescription
commandstring – The command that was executed
errorstring, null – The command’s error output
exitCodeinteger – The command’s exit code

command ​

Type
string
Default value
null

The command that was executed

View source

error ​

Type
string, null
Default value
null

The command’s error output

View source

exitCode ​

Type
integer
Default value
null

The command’s exit code

View source

Public Methods ​

MethodDescription
__construct()Constructor.
createFromCommand()Creates a ShellCommandException from a \mikehaertl\shellcommand\Command object
getName()

__construct() ​

Constructor.

View source

Arguments ​

  • $command (string) – The command that was executed
  • $exitCode (integer) – The command’s exit code
  • $error (string, null) – The command’s error output
  • $message (string, null) – The error message
  • $code (integer) – The error code

createFromCommand() ​

Creates a ShellCommandException from a \mikehaertl\shellcommand\Command object

View source

Arguments ​

  • $command (\mikehaertl\shellcommand\Command) – The failed Command object

Returns ​

static, false

getName() ​

View source

Returns ​

string – The user-friendly name of this exception