* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Domain\Customer\Exception; use PrestaShop\PrestaShop\Core\Domain\ValueObject\Email; /** * Exception is thrown when email which already exists is being used to create or update other customer */ class DuplicateCustomerEmailException extends CustomerException { /** * @var Email */ private $email; /** * @param Email $email * @param string $message * @param int $code * @param null $previous */ public function __construct(Email $email, $message = '', $code = 0, $previous = null) { parent::__construct($message, $code, $previous); $this->email = $email; } /** * @return Email */ public function getEmail() { return $this->email; } }