PDepend\Engine::getExceptions PHP Method

getExceptions() public method

Returns an array with all {@link \PDepend\Source\Parser\ParserException} that were caught during the parsing process.
public getExceptions ( ) : PDepend\Source\Parser\ParserException[]
return PDepend\Source\Parser\ParserException[]
    public function getExceptions()
    {
        return $this->parseExceptions;
    }

Usage Example

Beispiel #1
0
 /**
  * Parses the projects source and reports all detected errors and violations.
  *
  * @param \PHPMD\Report $report
  * @return void
  */
 public function parse(Report $report)
 {
     $this->setReport($report);
     $this->pdepend->addReportGenerator($this);
     $this->pdepend->analyze();
     foreach ($this->pdepend->getExceptions() as $exception) {
         $report->addError(new ProcessingError($exception->getMessage()));
     }
 }