Files
WP-LIT-MCP/src/Integrations/WordPress/Status/ReplaceFailed.php
T

22 lines
550 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
namespace LIT\MCP\Integrations\WordPress\Status;
use RuntimeException;
use Throwable;
/**
* Thrown by PostCloner::replace(). $parts lists the parts of the original replace()
* had started to write (post, meta, terms) – only those need to be restored.
*/
final class ReplaceFailed extends RuntimeException
{
/** @param list<string> $parts */
public function __construct(public readonly array $parts, Throwable $previous)
{
parent::__construct($previous->getMessage(), 0, $previous);
}
}