1
0
mirror of synced 2024-12-05 03:06:05 +03:00

show given path for MappingException::fileMappingDriversRequireConfiguredDirectoryPath

This commit is contained in:
steffkes 2010-09-15 21:14:15 +02:00 committed by Jonathan H. Wage
parent d3419780f9
commit 9fa8ff86f8
4 changed files with 12 additions and 5 deletions

View File

@ -155,7 +155,7 @@ abstract class AbstractFileDriver implements Driver
if ($this->_paths) {
foreach ((array) $this->_paths as $path) {
if ( ! is_dir($path)) {
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath();
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
}
$iterator = new \RecursiveIteratorIterator(

View File

@ -435,7 +435,7 @@ class AnnotationDriver implements Driver
foreach ($this->_paths as $path) {
if ( ! is_dir($path)) {
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath();
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
}
$iterator = new \RecursiveIteratorIterator(

View File

@ -78,7 +78,7 @@ class StaticPHPDriver implements Driver
foreach ($this->_paths as $path) {
if ( ! is_dir($path)) {
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath();
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
}
$iterator = new \RecursiveIteratorIterator(

View File

@ -170,9 +170,16 @@ class MappingException extends \Doctrine\ORM\ORMException
);
}
public static function fileMappingDriversRequireConfiguredDirectoryPath()
public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
{
return new self('File mapping drivers must have a valid directory path, however the given path seems to be incorrect!');
if ( ! empty($path)) {
$path = '[' . $path . ']';
}
return new self(
'File mapping drivers must have a valid directory path, ' .
'however the given path ' . $path . ' seems to be incorrect!'
);
}
/**