Craft 3 Class Reference

Class craft\errors\ShellCommandException

Inheritance
craft\errors\ShellCommandException » yii\base\Exception » Exception
Available since version
3.0
Source Code
https://github.com/craftcms/cms/blob/master/src/errors/ShellCommandException.php

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

Public Properties
Property Type Description Defined By
$command string, null The command that was executed craft\errors\ShellCommandException
$error string, null The command’s error output craft\errors\ShellCommandException
$exitCode integer, null The command’s exit code craft\errors\ShellCommandException
Public Methods
Method Description Defined By
__construct() Constructor. craft\errors\ShellCommandException
createFromCommand() Creates a ShellCommandException from a \mikehaertl\shellcommand\Command object craft\errors\ShellCommandException
getName() craft\errors\ShellCommandException

Property Details

$command public property #

The command that was executed

public string, null $command null

$error public property #

The command’s error output

public string, null $error null

$exitCode public property #

The command’s exit code

public integer, null $exitCode null

Method Details

__construct() public method #

Constructor.

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 )
$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() public static method #

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

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

getName() public method #

public string getName ( )
return string The user-friendly name of this exception