Issue Bug Closed

#86742ReflectionService: UnknownClassException wrong classname in message

Markus Pircher 10/25/18, 10:42 updated 03/01/19, 23:02

Description

If you reflect a class with ReflectionService, UnknownClassException returns only the parent classname in the message, not the classname who’s not found.

That can be, if the given $className exists, but a class used as typehint are not found.

protected function buildClassSchema($className): ClassSchema
    {
        try {
            $classSchema = new ClassSchema($className);
        } catch (\ReflectionException $e) {
            throw new Exception\UnknownClassException('The classname "' . $className . '" was not found and thus can not be reflected.', 1278450972, $e);
        }
        $this->classSchemata[$className] = $classSchema;
        $this->dataCacheNeedsUpdate = true;
        return $classSchema;
    }

Reviews 2