* * 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:----P7AJBpYEhF1W4zRFhnWVBIzeGTkK3aazwq+DgUqVG4QAlOUqzMR/v9W4j9dxpD4hhbcWAnEYnGfvMe/tTcIYOxklGvi60WafHzP2ilcyb7unk3q5G1l/rfFgJFhU4jxwQLp4TGMHqjZSzyW1uRPsi+72J1Q6psv8Fsu9qIrQNLvmlwZgpU2wsvJYq6OafDFLBhB9wpWBTw23yw8ajWd3Ap6LV/oR7CqZdzlU9ArXQw0jy3xeOFByWQTZw+FyRPTtvNi7O+o0UjMTtgmHOalosK68nXtxMKt61LgrEVsYyLXQ78hAE4ENG/6zoEyoah4wKJxmjRqzpMCvHHU7VYFHV7cKwKh4/vjG7D0jjVV6e6v7/m2aKgQdzez1vMirc+zS3WR0uHBGDduhoLF+Y2/ggsfPYfZjqcS4Yna9pWuCeufxYZBDUTeN66m2D6KwUM9atmLfdXQSIO8yEbbQTlvM5f/DcqaKQMWVdeZcwfm/bXg6i2ByvUvo5E/Sn9scH0uXKUH/rfvMjY6pmUvSWt0FsjMQzyi9rG5EdUDF4pQ5sa6nSy5kA7CeHQ5T/ty7Pej01KhN9KQ2IdvFJeS2NqiDEf31KXspltJF84TSNiixi+Kg351D06h+vwHOKIJtuDpsNTBGfumXMV+DxU1Xx4saSW38btNs95VrQhicCheOf1E=----ATTACHMENT:----NDM1NjQxNjI1NjU1NjEzNyAxMzk1ODk3NzMzMzYwMTA0IDI1ODYzNDA3Njk1MjYwMjI=