コード例 #1
0
 function renderExceptionMessage(\Exception $exception, $debug = false)
 {
     if ($debug) {
         echo ExceptionHandlerFormatter::format($exception, false);
     } else {
         echo "Call admin 1";
     }
 }
コード例 #2
0
 public static function renderExceptionMessage(\Exception $exception, $debug = false)
 {
     if ($debug) {
         echo ExceptionHandlerFormatter::format($exception, false);
     } else {
         $context = Main\Application::getInstance();
         if ($context) {
             echo Main\Localization\Loc::getMessage("eho_render_exception_message");
         } else {
             echo "A error occurred during execution of this script. You can turn on extended error reporting in .settings.php file.";
         }
     }
 }
コード例 #3
0
 function renderExceptionMessage(\Exception $exception, $debug = false)
 {
     if ($debug) {
         echo ExceptionHandlerFormatter::format($exception, true);
     } else {
         $p = Main\IO\Path::convertRelativeToAbsolute("/error.php");
         if (Main\IO\File::isFileExists($p)) {
             include $p;
         } else {
             $context = Main\Application::getInstance();
             if ($context) {
                 echo Main\Localization\Loc::getMessage("eho_render_exception_message");
             } else {
                 echo "A error occurred during execution of this script. You can turn on extended error reporting in .settings.php file.";
             }
         }
     }
 }
コード例 #4
0
 public function write(\Exception $exception, $logType)
 {
     $text = ExceptionHandlerFormatter::format($exception, false, $this->level);
     $this->writeToLog(date("Y-m-d H:i:s") . " - Host: " . $_SERVER["HTTP_HOST"] . " - " . static::logTypeToString($logType) . " - " . $text . "\n");
 }
コード例 #5
0
 public function write(\Exception $exception, $logType)
 {
     $text = ExceptionHandlerFormatter::format($exception, false);
     $this->writeToLog(date("Y-m-d H:i:s") . " - " . static::logTypeToString($logType) . " - " . $text . "\n");
 }