Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/Process/Exceptions/ProcessFailedException.php
Строк: 43
<?php

namespace IlluminateProcessExceptions;

use 
IlluminateContractsProcessProcessResult;
use 
RuntimeException;

class 
ProcessFailedException extends RuntimeException
{
    
/**
     * The process result instance.
     *
     * @var IlluminateContractsProcessProcessResult
     */
    
public $result;

    
/**
     * Create a new exception instance.
     *
     * @param  IlluminateContractsProcessProcessResult  $result
     * @return void
     */
    
public function __construct(ProcessResult $result)
    {
        
$this->result $result;

        
$error sprintf('The command "%s" failed.'."nnExit Code: %s",
            
$result->command(),
            
$result->exitCode(),
        );

        if (! empty(
$result->output())) {
            
$error .= sprintf("nnOutput:n================n%s"$result->output());
        }

        if (! empty(
$result->errorOutput())) {
            
$error .= sprintf("nnError Output:n================n%s"$result->errorOutput());
        }

        
parent::__construct($error$result->exitCode() ?? 1);
    }
}
Онлайн: 4
Реклама