DDC-3078 - adding exception methods for invalid cache instantiator
This commit is contained in:
parent
04b52149ab
commit
1b5eb55ed9
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user