35 lines
718 B
PHP
35 lines
718 B
PHP
<?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;
|
|
}
|
|
}
|