Deployer\Executor\Informer::taskError PHP Method

taskError() public method

Print error.
public taskError ( boolean $nonFatal = true )
$nonFatal boolean
    public function taskError($nonFatal = true)
    {
        if ($nonFatal) {
            $this->output->writeln("<fg=yellow>✘</fg=yellow> Some errors occurred!");
        } else {
            $this->output->writeln("<fg=red>✘</fg=red> <options=underscore>Some errors occurred!</options=underscore>");
        }
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function run($tasks, $servers, $environments, $input, $output)
 {
     $output = new OutputWatcher($output);
     $informer = new Informer($output);
     foreach ($tasks as $task) {
         $success = true;
         $informer->startTask($task->getName());
         if ($task->isOnce()) {
             $task->run(new Context(null, null, $input, $output));
         } else {
             foreach ($servers as $serverName => $server) {
                 if ($task->runOnServer($serverName)) {
                     $env = isset($environments[$serverName]) ? $environments[$serverName] : ($environments[$serverName] = new Environment());
                     $informer->onServer($serverName);
                     try {
                         $task->run(new Context($server, $env, $input, $output));
                     } catch (NonFatalException $exception) {
                         $success = false;
                         $informer->taskException($serverName, 'Deployer\\Task\\NonFatalException', $exception->getMessage());
                     }
                     $informer->endOnServer($serverName);
                 }
             }
         }
         if ($success) {
             $informer->endTask();
         } else {
             $informer->taskError();
         }
     }
 }
All Usage Examples Of Deployer\Executor\Informer::taskError