for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace FRZB\Component\RequestMapper\Exception;
final class ExceptionMapperLocatorException extends \DomainException
{
private const NO_MAPPER_FOUND_MESSAGE = 'No mapper found for exception "%s"';
public static function noMapperFound(\Throwable $previous, bool $wrapCallable = true)
$message = sprintf(self::NO_MAPPER_FOUND_MESSAGE, $previous::class);
$exception = new self($message, previous: $previous);
return $wrapCallable ? static fn () => throw $exception : $exception;
}