Runtime Exception sounds perfectly reasonable to me, I used the word rethrow but that was more what I had in mind, throwing a new exception type - Run time makes sense to me.

--  
Matt Frost
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Tuesday, November 19, 2013 at 11:23 AM, Jeff Carouth wrote:

> In site/src/MentorApp/TagService.php:
> > + * @return boolean returns true if id exists and false otherwise > + */ > + public function exists($id) > + { > + try { > + $query = "SELECT id FROM `tags` WHERE id = :id"; > + $statement = $this->db->prepare($query); > + $statement->execute(['id' => $id]); > + if($statement->rowCount() > 0) { > + return true; > + } > + return false; > + } catch (\PDOException $e) { > + // log > + } > + return false;  
> Usually if I don't have a better specific exception for this situation I would throw a RuntimeException. The reason being I don't like to let information like "we're using PDO" to leak into the application.  
> So, yes, it would be reasonable to either re-throw the PDOException , to wrap it in either a custom exception class, one of the predefined SPL exceptions, or a simple ErrorException/Exception.  
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/phpmentoring/mentor-app/pull/46/files#r7762386).
>  
>  
>