/** * Displays raw error without using any layout * * @param Exception $error * @internal */ private function displayRawError(VegasException $error) { $this->di->get('response')->setContent($error->getCode() . ' ' . $error->getMessage()); }
/** * Displays raw error without using any layout * * @param Exception $error * @internal */ private function displayRawError(VegasException $error) { if (Constants::DEV_ENV === $this->di->get('environment')) { trigger_error($error->getCode() . ' ' . $error->getMessage() . ' ' . $error->getPrevious()->getTraceAsString(), E_USER_ERROR); } elseif (Constants::TEST_ENV === $this->di->get('environment')) { echo $error->getCode() . PHP_EOL . $error->getMessage() . PHP_EOL . $error->getPrevious()->getTraceAsString(); } }