Permalink
Browse files

Made the exception message more useful

  • Loading branch information...
1 parent 73ea97a commit c3de53a1df8e63b5c01ded0ccc641fa4022e6743 @archwisp committed Jun 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 Dbms/Record/Mapper/Abstract.php
@@ -674,8 +674,8 @@ protected function validateModelClass(
if (!$model instanceof $expected_model_class)
{
throw new InvalidArgumentException(
- sprintf('Expected instance of (%s), instance of (%s) given',
- $expected_model_class, get_class($model)));
+ sprintf('Expected instance of (%s), instance of (%s) given in %s',
+ $expected_model_class, get_class($model), get_class($this)));
}
}

0 comments on commit c3de53a

Please sign in to comment.