/**
  * Outputs text to the output and / or logs an error text (if logger is set).
  *
  * It can also redirect to the error page if right parameter is set in the init function.
  *
  * @param string $exText Exception string.
  * @return bool False if code is not outputted properly.
  */
 private static function outputExceptionText($exText)
 {
     if (!ExceptionHandler::$isCli) {
         $exText = ExceptionHandler::prepTextForBrowser($exText);
     }
     die($exText);
 }
Beispiel #2
0
 /**
  * Sets up Logger.
  */
 private function setUpLogger()
 {
     $this->loadClassCheckInterface('logger', 'Framework\\Core\\FrameworkClasses\\Logging\\ILogger');
     $this->logger = new Logger($this->config->get('log_file'), $this->config->get('new_line'), $this->config->get('log_time_format'), $this->config->get('debug_mode'));
     ExceptionHandler::setLogger($this->logger);
 }