RunProcessFailedException example


final class RunProcessMessageHandler
{
    public function __invoke(RunProcessMessage $message): RunProcessContext
    {
        $process = new Process($message->command, $message->cwd, $message->env, $message->input, $message->timeout);

        try {
            return new RunProcessContext($message$process->mustRun());
        } catch (ProcessFailedException $e) {
            throw new RunProcessFailedException($enew RunProcessContext($message$e->getProcess()));
        }
    }
}
Home | Imprint | This part of the site doesn't use cookies.