Function __global->fatal_exit

Definitions

sources/global2.php

  • Do a fatal exit, echo the header (if possible) and an error message, followed by a debugging back-trace.It also adds an entry to the error log, for reference.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$text mixed No No required parameter N/A N/A The error message, provided in plain-text format or as HTML via do_lang_tempcode/protect_from_escaping (string or Tempcode)
$log_error boolean No No True N/A N/A Whether to log the error
$http_status integer No No 500 N/A N/A HTTP status to set

Preview

Code (PHP)

/**
 * Do a fatal exit, echo the header (if possible) and an error message, followed by a debugging back-trace.It also adds an entry to the error log, for reference.
 *
 * @param  mixed $text The error message, provided in plain-text format or as HTML via do_lang_tempcode/protect_from_escaping (string or Tempcode)
 * @param  boolean $log_error Whether to log the error
 * @param  integer $http_status HTTP status to set
 */

function fatal_exit($text, bool $log_error = true, int $http_status = 500)
 

sources/minikernel.php

  • Do a clean exit, echo the header (if possible) and an error message, followed by a debugging back-trace.It also adds an entry to the error log, for reference.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$text mixed No No required parameter N/A N/A The error message

Preview

Code (PHP)

/**
 * Do a clean exit, echo the header (if possible) and an error message, followed by a debugging back-trace.It also adds an entry to the error log, for reference.
 *
 * @param  mixed $text The error message
 */

function fatal_exit($text)