mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-24 16:18:18 +00:00
New exception
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Egulias\EmailValidator;
|
||||
|
||||
use Egulias\EmailValidator\Exception\ExpectingATEXT;
|
||||
use Egulias\EmailValidator\Exception\NoLocalPart;
|
||||
use Egulias\EmailValidator\Parser\DomainPart;
|
||||
use Egulias\EmailValidator\Parser\LocalPart;
|
||||
@@ -48,7 +49,7 @@ class EmailParser
|
||||
$this->setParts($str);
|
||||
|
||||
if ($this->lexer->hasInvalidTokens()) {
|
||||
throw new \InvalidArgumentException('ERR_INVALID_ATEXT');
|
||||
throw new ExpectingATEXT();
|
||||
}
|
||||
|
||||
return array('local' => $this->localPart, 'domain' => $this->domainPart);
|
||||
|
||||
Reference in New Issue
Block a user