/** * {@inheritdoc} */ public function catchException(App\Bootstrap $bootstrap, \Exception $exception) { $this->response->setHttpResponseCode(404); if ($bootstrap->isDeveloperMode()) { $this->response->setHeader('Content-Type', 'text/plain'); $this->response->setBody($exception->getMessage() . "\n" . $exception->getTraceAsString()); } $this->response->sendResponse(); return true; }
/** * {@inheritdoc} */ public function setHeader($name, $value, $replace = false) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setHeader'); if (!$pluginInfo) { return parent::setHeader($name, $value, $replace); } else { return $this->___callPlugins('setHeader', func_get_args(), $pluginInfo); } }