From: Roland Häder Date: Mon, 1 Jan 2018 03:51:59 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=edbaec7aa8e1019d10b7a3351e1629fed93740f4;p=core.git Continued: - also "documented" namespace expansion (Tld\Domain\) in thrown exceptions Signed-off-by: Roland Häder --- diff --git a/framework/loader/class_ClassLoader.php b/framework/loader/class_ClassLoader.php index 481db262..fab4e559 100644 --- a/framework/loader/class_ClassLoader.php +++ b/framework/loader/class_ClassLoader.php @@ -550,7 +550,7 @@ class ClassLoader { // At least 3 parts should be there if ((self::$strictNamingConvention === true) && (count($classNameParts) < 5)) { // Namespace scheme is: Project\Package[\SubPackage...] - throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Project\Package[\SubPackage...]\SomeFooBar', $className)); + throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Tld\Domain\Project\Package[\SubPackage...]\SomeFooBar', $className)); } // END - if // Get last element diff --git a/framework/main/classes/factories/objects/class_ObjectFactory.php b/framework/main/classes/factories/objects/class_ObjectFactory.php index e0ca76b3..f06a70a1 100644 --- a/framework/main/classes/factories/objects/class_ObjectFactory.php +++ b/framework/main/classes/factories/objects/class_ObjectFactory.php @@ -70,7 +70,7 @@ class ObjectFactory extends BaseFactory { throw new NoClassException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND); } elseif (count($classNameParts) < 3) { // Namespaces are missing - throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Project\Package[\SubPackage...]\SomeFooBar', $className)); + throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Tld\Domain\Project\Package[\SubPackage...]\SomeFooBar', $className)); } // Create method name diff --git a/framework/main/exceptions/main/class_InvalidClassNameException.php b/framework/main/exceptions/main/class_InvalidClassNameException.php index 0f7d2ae6..959807d4 100644 --- a/framework/main/exceptions/main/class_InvalidClassNameException.php +++ b/framework/main/exceptions/main/class_InvalidClassNameException.php @@ -39,7 +39,7 @@ class InvalidClassNameException extends FrameworkException { */ public function __construct ($className, $code) { // Add a message around the missing class - $message = sprintf('[%d]: Class name "%s" is not conform to naming-convention: Project\Package[\SubPackage...]\SomeFooBar', + $message = sprintf('[%d]: Class name "%s" is not conform to naming-convention: Tld\Domain\Project\Package[\SubPackage...]\SomeFooBar', $this->getLine(), $className );