Skip to content

Commit

Permalink
Improve error message when associations are not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 19, 2018
1 parent 1c3d6af commit 9b7d074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Table.php
Expand Up @@ -968,7 +968,7 @@ public function getAssociation($name)
{
$association = $this->findAssociation($name);
if (!$association) {
throw new InvalidArgumentException('Association does not exist: ' . $name);
throw new InvalidArgumentException("The {$name} association is not defined on {$this->getAlias()}.");
}

return $association;
Expand Down

0 comments on commit 9b7d074

Please sign in to comment.