public function exceptionAction(FlattenException $exception) { $this->view->status_code = $exception->getStatusCode(); $this->view->message = $exception->getMessage(); $this->view->file = $this->getShortFileName($exception->getFile()); $this->view->line = $exception->getLine(); $this->view->trace = $this->parseTrace($exception->getTrace()); return $this->renderTo('@HideksFramework/templates/exception.html'); }
/** * Check last send time * * @param FlattenException $exception * @return bool */ private function checkRepeat(FlattenException $exception) { $key = md5($exception->getMessage() . ':' . $exception->getLine() . ':' . $exception->getFile()); $file = $this->errorsDir . '/' . $key; $time = is_file($file) ? file_get_contents($file) : 0; if ($time < time()) { file_put_contents($file, time() + $this->repeatTimeout); return false; } return true; }