/sources/failure.php

Description
Functions
add_ip_ban (line 445)

Add an IP-ban.

void add_ip_ban (IP $ip, [LONG_TEXT $descrip = ''])
  • IP $ip: The IP address to ban
  • LONG_TEXT $descrip: Explanation for ban
die_html_trace (line 749)

Echo an error message, and a debug back-trace of the current execution stack. Use this for debugging purposes.

void die_html_trace (string $message)
  • string $message: An error message
get_html_trace (line 795)

Return a debugging back-trace of the current execution stack. Use this for debugging purposes.

  • return: Debugging backtrace
tempcode get_html_trace ()
get_webservice_result (line 514)

Lookup error on ocportal.com, to see if there is more information.

  • return: The result from the web service (NULL: no result)
?string get_webservice_result (mixed $error_message)
  • mixed $error_message: The error message (string or tempcode)
improperly_filled_in (line 118)

Complain about a field being missing.

void improperly_filled_in (string $name, ?boolean $posted, array $array)
  • string $name: The name of the parameter
  • ?boolean $posted: Whether the parameter is a POST parameter (NULL: undetermined)
  • array $array: The array we're extracting parameters from
improperly_filled_in_post (line 149)

Complain about a POST field being missing.

void improperly_filled_in_post (string $name)
  • string $name: The name of the parameter
init__failure (line 24)

Standard code module initialisation function.

void init__failure ()
may_see_stack_dumps (line 732)

Find whether the current user may see stack dumps.

  • return: Whether the current user may see stack dumps
boolean may_see_stack_dumps ()
relay_error_mail (line 678)

Relay an error message, if appropriate, to e-mail listeners (sometimes ocProducts, and site staff).

void relay_error_mail (string $text, [boolean $ocproducts = true])
  • string $text: A error message (in HTML)
  • boolean $ocproducts: Also send to ocProducts
remove_ip_ban (line 486)

Remove an IP-ban.

void remove_ip_ban (IP $ip)
  • IP $ip: The IP address to unban
zip_error (line 37)

Terminate with an error caused by unzipping.

  • return: Error message.
tempcode zip_error (integer $errno, [boolean $mzip = false])
  • integer $errno: The zip error number.
  • boolean $mzip: Whether mzip was used.
_access_denied (line 884)

Show a helpful access-denied page. Has a login ability if it senses that logging in could curtail the error.

void _access_denied (ID_TEXT $class, string $param, boolean $force_login)
  • ID_TEXT $class: The class of error (e.g. SPECIFIC_PERMISSION)
  • string $param: The parameteter given to the error message
  • boolean $force_login: Force the user to login (even if perhaps they are logged in already)
_fatal_exit (line 565)

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.

void _fatal_exit (mixed $text, [boolean $return = false])
  • mixed $text: The error message (string or tempcode)
  • boolean $return: Whether to return
_generic_exit (line 225)

Do a terminal execution on a defined page type

void _generic_exit (mixed $text, ID_TEXT $template)
  • mixed $text: The error message (string or tempcode)
  • ID_TEXT $template: Name of the terminal page template
_log_hack_attack_and_exit (line 311)

Log a hackattack, then displays an error message. It also attempts to send an e-mail to the staff alerting them of the hackattack.

void _log_hack_attack_and_exit (ID_TEXT $reason, [SHORT_TEXT $reason_param_a = ''], [SHORT_TEXT $reason_param_b = ''])
  • ID_TEXT $reason: The reason for the hack attack. This has to be a language string codename
  • SHORT_TEXT $reason_param_a: A parameter for the hack attack language string (this should be based on a unique ID, preferably)
  • SHORT_TEXT $reason_param_b: A more illustrative parameter, which may be anything (e.g. a title)
_ocportal_error_handler (line 177)

Called by 'ocportal_error_handler'. ocPortal error handler (hooked into PHP error system).

void _ocportal_error_handler (ID_TEXT $type, integer $errno, PATH $errstr, string $errfile, integer $errline)
  • ID_TEXT $type: Error type indicator (tiny human-readable text string)
  • integer $errno: The error code-number
  • PATH $errstr: The error message
  • string $errfile: The file the error occured in
  • integer $errline: The line the error occured on
_param_invalid (line 83)

Handle invalid parameter values.

  • return: Fixed parameter (usually the function won't return [instead will give an error], but in special cases, it can filter an invalid return)
string _param_invalid (string $name, ?string $ret, boolean $posted)
  • string $name: The parameter deemed to have an invalid value somehow
  • ?string $ret: The value of the parameter deemed invalid (NULL: we known we can't recover)
  • boolean $posted: Whether the parameter is a POST parameter

Documentation generated on Sun, 02 Jan 2011 23:14:27 +0000 by phpDocumentor 1.4.3