ShellCommandException

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

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

View source

Public Properties

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

$command

Type
string, null

The command that was executed

View source

Signature

public string, null $command = null

$error

Type
string, null

The command’s error output

View source

Signature

public string, null $error = null

$exitCode

Type
integer, null

The command’s exit code

View source

Signature

public integer, null $exitCode = null

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

Signature

public void __construct ( \craft\errors\string $command, \craft\errors\int $exitCode, \craft\errors\string $error = null, \craft\errors\string $message = null, \craft\errors\int $code = 0 )

createFromCommand()

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

View source

Arguments

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

Returns

static, false

Signature

public static static, false createFromCommand ( \mikehaertl\shellcommand\Command $command )

getName()

View source

Returns

string – The user-friendly name of this exception

Signature

public string getName ( )