* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Domain\OrderState\Exception; use PrestaShop\PrestaShop\Core\Domain\OrderState\ValueObject\Name; /** * Exception is thrown when name which already exists is being used to create or update other order state */ class DuplicateOrderStateNameException extends OrderStateException { /** * @var Name */ private $name; /** * @param string $message * @param int $code * @param null $previous */ public function __construct(Name $name, $message = '', $code = 0, $previous = null) { parent::__construct($message, $code, $previous); $this->name = $name; } /** * @return Name */ public function getName() { return $this->name; } }