Example #1
0
 /**
  * @param \Exception $ex
  * @param string $from
  */
 public function registerException(\Exception $ex, $from)
 {
     $this->em = Functions::getEntityManager($this->em);
     $error = new ErrorLog();
     $error->setMessage($ex->getMessage());
     $error->setWhereError('File: ' . $ex->getFile() . ', Line: ' . $ex->getLine());
     $error->setFromError($from);
     $this->em->persist($error);
     $this->em->flush();
 }