public function handleException($ex)
 {
     if ($this->exceptionRender) {
         $this->renderException($ex);
     } else {
         Logger::renderServerCrash();
     }
     if ($this->exceptionFileLogging) {
         $this->logExceptionToFile($ex);
     }
 }
<?php

require_once "./ph/autoload/autoload-register.php";
\ph\logging\Logger::initialize();
$app = new \ph\Application();
$app->run();
 public function handleFatalError()
 {
     if ($error = error_get_last() and $error['type'] & (E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR)) {
         ob_end_clean();
         if ($this->errorRender) {
             echo $this->generateHtmlForError($error['type'], $error['message'], $error['file'], $error['line']);
         } else {
             Logger::renderServerCrash();
         }
     } else {
         ob_end_flush();
     }
 }