/** * Handle http exceptions * * @param UnknownHttpExceptionEvent $event */ public function onException(UnknownHttpExceptionEvent $event) { if (!$this->environment->equals(Environment::DEVELOPMENT)) { return; } $event->stopPropagation(); $this->whoops->writeToOutput(false); $this->whoops->allowQuit(false); $content = $this->whoops->handleException($event->getHttpException()); $event->getResponse()->setContent($content); }
/** * Handle power up event * * @param SimpleEvent $e */ public function onPowerUp(SimpleEvent $e) { if (getenv('THINFRAME_ENVIRONMENT')) { $this->environment->setValue(getenv('THINFRAME_ENVIRONMENT')); } }