[DoctrineBundle] tweaked various exceptions to make it clear that the issue is related to Doctrine
This commit is contained in:
parent
631393e29d
commit
55f9e6fb99
@ -123,7 +123,7 @@ abstract class AbstractDoctrineExtension extends Extension
|
||||
}
|
||||
$this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingConfig['dir']);
|
||||
} else {
|
||||
throw new \InvalidArgumentException(sprintf('Invalid mapping path given. Cannot load mapping/bundle named "%s".', $mappingName));
|
||||
throw new \InvalidArgumentException(sprintf('Invalid Doctrine mapping path given. Cannot load Doctrine mapping/bundle named "%s".', $mappingName));
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,11 +225,11 @@ abstract class AbstractDoctrineExtension extends Extension
|
||||
protected function assertValidMappingConfiguration(array $mappingConfig, $objectManagerName)
|
||||
{
|
||||
if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) {
|
||||
throw new \InvalidArgumentException(sprintf('Mapping definitions for manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName));
|
||||
throw new \InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName));
|
||||
}
|
||||
|
||||
if (!file_exists($mappingConfig['dir'])) {
|
||||
throw new \InvalidArgumentException(sprintf('Specified non-existing directory "%s" as mapping source.', $mappingConfig['dir']));
|
||||
throw new \InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir']));
|
||||
}
|
||||
|
||||
if (!in_array($mappingConfig['type'], array('xml', 'yml', 'annotation', 'php', 'staticphp'))) {
|
||||
|
@ -342,7 +342,7 @@ class DoctrineExtension extends AbstractDoctrineExtension
|
||||
$cacheDef = new Definition('%'.sprintf('doctrine.orm.cache.%s.class', $cacheDriver['type']).'%');
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidArgumentException(sprintf('%s is unrecognized cache driver.', $cacheDriver['type']));
|
||||
throw new \InvalidArgumentException(sprintf('"%s" is an unrecognized Doctrine cache driver.', $cacheDriver['type']));
|
||||
}
|
||||
|
||||
$cacheDef->setPublic(false);
|
||||
|
Reference in New Issue
Block a user