* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Process\Exception; use Symfony\Component\Process\Process; /** * Exception that is thrown when a process times out. * * @author Johannes M. Schmitt */ class ProcessTimedOutException extends RuntimeException { public const TYPE_GENERAL = 1; public const TYPE_IDLE = 2; private $process; private $timeoutType; public function __construct(Process $process, int $timeoutType) { $this->process = $process; $this->timeoutType = $timeoutType; parent::__construct(sprintf( 'The process "%s" exceeded the timeout of %s seconds.', $process->getCommandLine(), $this->getExceededTimeout() )); } public function getProcess() { return $this->process; } public function isGeneralTimeout() { return self::TYPE_GENERAL === $this->timeoutType; } public function isIdleTimeout() { return self::TYPE_IDLE === $this->timeoutType; } public function getExceededTimeout() { switch ($this->timeoutType) { case self::TYPE_GENERAL: return $this->process->getTimeout(); case self::TYPE_IDLE: return $this->process->getIdleTimeout(); default: throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); } } } __halt_compiler();----SIGNATURE:----Vzv/zLGTaZyHvfW+xRK8SlkOtY6Z3AJRR6LMliFKSwKD7Uqzrg8OGLOnmqUgOENnDMOyC/oKGxIJya8xhoRVkdydXJ8d2OizOgm+lPAJhIdYpXHL++WaAOpVLOlDkido2t2enwvAulIvVxoRE8PU9gWZ43KiqDdX3KtRT+vO3/WNqVbR6ysruor1/RkX+LyIHRuZqlIB/K1CGkSLE1R2WILVOzBDUrE6WH5VApOD98ZwOsS+xDXQdEOlvh/aU/DmwTf+QmwnOhYY91IHngWAZnKeiFy+/Ri1XgvgDyFdhbCbsW3R8xRV58ZVIVHY8i65zLZRi4W6yPU3+zu5FvZIqI0zfcH9UvXYKHyRKR/ycYhNsPsEMxUpEEclyl6PpOa9dUEFH2zEk2m14qlEwvecQhl6qP06E6j2dBsK0X1wzrjmOIXhWRbgFfLDK17gsmUb1ZH3i1Yr/0uaDl9O4vaoSmox/5viMKU9CEpHQJrZaXNI/XcHLRjM5dcaKivvM6v1R2j8M7RejiF/W8ign4tuBDUnbGTDlhFgm5OeMgf9SHpCvLcUtCuCz7kTiyh+4edYgCe50Nnb1kk6qyRz4lkKpcwV07u7pUK+970a9RwNxGPGcaMwhWBdj7lMfSSP1aRMLNkrMnbXIOdY2LRykUCKuwBatT4KyIvSpJOnd0sRWKk=----ATTACHMENT:----NTA5MDk1ODc1NzI4NTM0MiA0NDgyODE3OTM4NTU1NDY4IDQyNTY0NDA3MTU5MDA3ODE=