Exceptions related with the security bundle should inherit form this exception and use it's exception codes.
Inheritance: extends Exceptio\Exception
 public function __construct($limit, UserInterface $user)
 {
     parent::__construct('The resetting-email limit has been reached!', 1007);
     $this->limit = $limit;
     $this->user = $user;
 }
Example #2
0
 public function __construct(UserInterface $user)
 {
     parent::__construct(sprintf('The user "%s" has no token!', $user->getUsername()), 1006);
     $this->user = $user;
 }