/** * throw exception if usersTable passed is not valid * @param Mysqltcs $connection * @param string $usersTable * @throws UsersManagementException */ private static function usersTableCheck(Mysqltcs $connection, $usersTable) { //check table name try { $operations = new MysqltcsOperations($connection, $usersTable); if ($operations->getTableInfo("Name") != $usersTable) { throw new UsersManagementException("Table name passed is not corrected"); } } catch (MysqltcsException $e) { throw new UsersManagementException("Table name passed is not corrected", 0, $e); } }