/**
  * @param Exception $exception
  * @param Report $report
  */
 protected function _processTrace(Report $report)
 {
     foreach ($this->exception->getTrace() as $t) {
         $aeTrace = new Traceback();
         $aeTrace->setFile(isset($t['file']) ? $t['file'] : 'unknown');
         $aeTrace->setFn(isset($t['class']) ? "{$t['class']}->{$t['function']}" : $t['function']);
         $aeTrace->setLine(isset($t['line']) ? $t['line'] : 0);
         $aeArgs = array();
         foreach ($t['args'] as $arg) {
             $aeArgs[] = $arg;
         }
         $aeTrace->setVars(json_encode($aeArgs));
         $report->addTraceback($aeTrace);
         unset($aeTrace);
     }
 }
Exemplo n.º 2
0
 /**
  * Adds dictionary describing lines of exception traceback, having optionally attached framelocal variables to them
  * @param Traceback $traceback
  * @return \AppEnlight\Endpoint\Data\Report
  */
 public function addTraceback(Traceback $traceback)
 {
     $this->_traceback[] = $traceback->toArray();
     return $this;
 }