Example #1
0
 /**
  * Default script exit handler
  * @param PLUGError
  * @return void
  */
 private static function death(PLUGError $Err)
 {
     if (PLUG_CLI) {
         // Print final death message to stderr if last error was logged
         $logfile = ini_get('error_log');
         if ($logfile) {
             PLUGCli::stdout("Error, %s exiting %s\n", $Err->getMessage(), $Err->code);
         }
     } else {
         // display all errors in browser
         PLUG::dump_errors();
     }
     exit($Err->code);
 }