lib/Benchmark/Metadata/AnnotationReader.php
private function parse($input, $context = '')
    {
        try {
            $annotations = $this->docParser->parse($input, $context);
        } catch (AnnotationException $e) {
            if (!preg_match('/The annotation "(.*)" .* was never imported/', $e->getMessage(), $matches)) {
                throw $e;
            }

            throw new \InvalidArgumentException(sprintf(
                'Unrecognized annotation %s, valid PHPBench annotations: @%s',
                $matches[1],
                implode(', @', array_keys(self::$phpBenchImports))
            ), 0, $e);
        }

        return $annotations;
    }
private function parse($input, $context = '')
    {
        try {
            $annotations = $this->docParser->parse($input, $context);
        } catch (AnnotationException $e) {
            if (!preg_match('/The annotation "(.*)" .* was never imported/', $e->getMessage(), $matches)) {
                throw $e;
            }

            throw new \InvalidArgumentException(sprintf(
                'Unrecognized annotation %s, valid PHPBench annotations: @%s',
                $matches[1],
                implode(', @', array_keys(self::$phpBenchImports))
            ), 0, $e);
        }

        return $annotations;
    }
private function parse ( $ input , $ context = '' ) { try { $ annotations = $ this -> docParser -> parse ( $ input , $ context ) ; } catch ( AnnotationException $ e ) { if ( ! preg_match ( '/The annotation "(.*)" .* was never imported/' , $ e -> getMessage ( ) , $ matches ) ) { throw $ e ; } throw new \ InvalidArgumentException ( sprintf ( 'Unrecognized annotation %s, valid PHPBench annotations: @%s' , $ matches [ 1 ] , implode ( ', @' , array_keys ( self :: $ phpBenchImports ) ) ) , 0 , $ e ) ; } return $ annotations ; }
Delegates to the doctrine DocParser but catches annotation not found errors and throws
something useful.

@see \Doctrine\Common\Annotations\DocParser
Delegates to the doctrine DocParser but catches annotation not found errors and throws something useful .