Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgu74 committed Oct 30, 2013
1 parent a15dbf5 commit 091a3f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions class/Application.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function fromKey($key) {
Array($this->app_key));
$row = $this->db->fetchArray($query);
if ($this->db->affectedRows() != 1) {
throw new Exception("La clef d'application n'a pas été reconnu !");
throw new ApplicationException("La clef d'application n'a pas été reconnu !");
}
$this->fromArray($row);
}
Expand All @@ -69,7 +69,7 @@ public function fromId($id) {
Array($this->app_id));
$row = $this->db->fetchArray($query);
if ($this->db->affectedRows() != 1) {
throw new Exception("Il n'existe pas d'application correspondant à cet ID !");
throw new ApplicationException("Il n'existe pas d'application correspondant à cet ID !");
}
$this->fromArray($row);
}
Expand Down Expand Up @@ -113,6 +113,9 @@ public function fromRight($service, $fun_id=null)
}

$result = $qb->execute()->fetch();
if(!result) {
throw new ApplicationException("Il n'y a pas d'application ayant le droit $service, pour la fundation $fun_id");
}
$this->fromArray($result);
}

Expand Down

0 comments on commit 091a3f4

Please sign in to comment.