diff --git a/lib/Doctrine/ORM/ORMException.php b/lib/Doctrine/ORM/ORMException.php index 40c0cb3be..bf200b7d5 100644 --- a/lib/Doctrine/ORM/ORMException.php +++ b/lib/Doctrine/ORM/ORMException.php @@ -262,6 +262,19 @@ class ORMException extends Exception return new self("Invalid repository class '".$className."'. It must be a Doctrine\Common\Persistence\ObjectRepository."); } + /** + * @param mixed $instantiator + * + * @return ORMException + */ + public static function invalidSecondLevelCacheInstantiator($instantiator) + { + return new self(sprintf( + 'The provided instantiator is not a valid callable, "%s" given.', + is_object($instantiator) ? get_class($instantiator) : gettype($instantiator) + )); + } + /** * @param string $className *