Cake\Console\Shell::abort PHP Method

abort() public method

Displays a formatted error message and exits the application with status code 1
public abort ( string $message, integer $exitCode = self::CODE_ERROR ) : void
$message string The error message
$exitCode integer The exit code for the shell task.
return void
    public function abort($message, $exitCode = self::CODE_ERROR)
    {
        $this->_io->err('<error>' . $message . '</error>');
        throw new StopException($message, $exitCode);
    }