Commit 8e24f16a authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout catch exception Doctrine nécessaire.

parent 0027d462
......@@ -2,6 +2,7 @@
namespace UnicaenAuth\Provider\Role;
use Doctrine\DBAL\DBALException;
use PDOException;
use Zend\Permissions\Acl\Role\RoleInterface;
use UnicaenAuth\Acl\NamedRole;
......@@ -58,6 +59,9 @@ class Db extends ObjectRepositoryProvider
try {
$roles = parent::getRoles();
}
catch (DBALException $exc) {
$roles = array();
}
catch (PDOException $exc) {
$roles = array();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment