Example #1
0
 /**
  * {@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;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function catchException(App\Bootstrap $bootstrap, \Exception $exception)
 {
     $this->_response->setHttpResponseCode(404);
     $this->_response->sendHeaders();
     return true;
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function setHttpResponseCode($code)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setHttpResponseCode');
     if (!$pluginInfo) {
         return parent::setHttpResponseCode($code);
     } else {
         return $this->___callPlugins('setHttpResponseCode', func_get_args(), $pluginInfo);
     }
 }