Throw better Exceptions
This commit is contained in:
@@ -18,7 +18,7 @@ class Hydrator {
|
||||
{
|
||||
if ( ! method_exists($eloquent, $include))
|
||||
{
|
||||
throw new \Exception("Attempting to eager load [$include], but the relationship is not defined.");
|
||||
throw new \LogicException("Attempting to eager load [$include], but the relationship is not defined.");
|
||||
}
|
||||
|
||||
static::eagerly($eloquent, $results, $include);
|
||||
@@ -209,4 +209,4 @@ class Hydrator {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user