for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaravelZero\Framework\Exceptions;
use Exception;
use LaravelZero\Framework\Contracts\Exceptions\ConsoleException as ConsoleExceptionContract;
/**
* This is the Laravel Zero Framework Console Exception class.
*
* @author Nuno Maduro <[email protected]>
*/
class ConsoleException extends Exception implements ConsoleExceptionContract
{
* The exit code.
* @var int
private $exitCode;
* The headers.
* @var array
private $headers;
* ConsoleException constructor.
* @param int $exitCode
* @param string|null $message
* @param \Exception|null $previous
* @param array $headers
* @param int code
public function __construct(
int $exitCode, string $message = null, array $headers = [], \Exception $previous = null, ?int $code = 0
) {
$this->exitCode = $exitCode;
$this->headers = $headers;
parent::__construct($message, $code, $previous);
}
* {@inheritdoc}
public function getExitCode(): int
return $this->exitCode;
public function getHeaders(): array
return $this->headers;
public function setHeaders(array $headers): ConsoleExceptionContract
return $this;