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;
 }
示例#2
0
 public function __construct(UserInterface $user)
 {
     parent::__construct(sprintf('The user "%s" has no token!', $user->getUsername()), 1006);
     $this->user = $user;
 }