ShellCommandException

Type
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

Property Description
command string, null – The command that was executed
error string, null – The command’s error output
exitCode integer, null – The command’s exit code

# command

Type
string, null

The command that was executed

View source

# error

Type
string, null

The command’s error output

View source

# exitCode

Type
integer, null

The command’s exit code

View source

# Public Methods

Method Description
__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