refactored WaitForHealthCheck strategy and added more granular exceptions

This commit is contained in:
Sergei Shitikov
2024-09-29 14:46:54 +02:00
parent 2f1c8750e0
commit a58ff460fa
8 changed files with 131 additions and 39 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Testcontainers\Exception;
class ContainerException extends \RuntimeException
{
protected string $containerId;
public function __construct(string $message, string $containerId = '', ?\Throwable $previous = null)
{
$this->containerId = $containerId;
parent::__construct($message, 0, $previous);
}
public function getContainerId(): string
{
return $this->containerId;
}
}