-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add context to process timeout exception
- Loading branch information
Jiří Bok
committed
May 14, 2023
1 parent
2891114
commit d4b8415
Showing
2 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Symplify\EasyParallel\ValueObject; | ||
|
||
use Exception; | ||
|
||
class ChildProcessTimeoutException extends Exception | ||
{ | ||
/** | ||
* @var mixed[] | ||
*/ | ||
private array $context = []; | ||
|
||
/** | ||
* @param mixed[] $context | ||
*/ | ||
public function __construct( | ||
string $message = '', | ||
array $context = [], | ||
int $code = 0, | ||
?Throwable $previous = null | ||
) { | ||
parent::__construct($message, $code, $previous); | ||
$this->context = $context; | ||
} | ||
|
||
/** | ||
* @return mixed[] | ||
*/ | ||
public function getContext(): array | ||
{ | ||
return $this->context; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters