stash light
This commit is contained in:
34
src/Index/IndexStructureChangedException.php
Normal file
34
src/Index/IndexStructureChangedException.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Index;
|
||||
|
||||
/**
|
||||
* Wird geworfen, wenn lokale Ingests nicht mehr kompatibel sind
|
||||
* und ein Global Reindex erzwungen werden muss.
|
||||
*/
|
||||
final class IndexStructureChangedException extends \RuntimeException
|
||||
{
|
||||
/**
|
||||
* @param array<string,mixed> $diff
|
||||
*/
|
||||
public function __construct(
|
||||
string $message,
|
||||
private readonly array $diff = [],
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function getDiff(): array
|
||||
{
|
||||
return $this->diff;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user