Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use named exceptions

  • Loading branch information...
commit 618e24b0c76b01b90485d0545300643a41cd525f 1 parent 9d796ea
William Durand authored July 03, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  src/EqualNestBehavior.php
4  src/EqualNestBehavior.php
@@ -33,7 +33,7 @@ public function modifyTable()
33 33
         $parentTable = $this->getParentTable();
34 34
 
35 35
         if (count($parentTable->getPrimaryKey()) > 1) {
36  
-            throw new Exception('Equal nest works only with a single primary key for the parent table');
  36
+            throw new RuntimeException('Equal nest works only with a single primary key for the parent table');
37 37
         }
38 38
 
39 39
         $parentTablePrimaryKey = $parentTable->getPrimaryKey();
@@ -143,7 +143,7 @@ public function queryMethods($builder)
143 143
     protected function getParentTable()
144 144
     {
145 145
         if (null === $this->getParameter('parent_table')) {
146  
-            throw new Exception('You must set a parent table for the Equal Nest behavior');
  146
+            throw new InvalidArgumentException('You must set a parent table for the Equal Nest behavior');
147 147
         }
148 148
 
149 149
         return $this->getTable()->getDatabase()->getTable($this->getParameter('parent_table'));

0 notes on commit 618e24b

Please sign in to comment.
Something went wrong with that request. Please try again.