You are here

function _customerror_fetch_error in Customerror 7

Same name and namespace in other branches
  1. 5 customerror.module \_customerror_fetch_error()
  2. 6 customerror.module \_customerror_fetch_error()

Fetch error.

2 calls to _customerror_fetch_error()
customerror_page in ./customerror.module
Returns the content to display on the the 403 or 404 error page.
customerror_page_title in ./customerror.module
Return the page title associated to the customerror code.

File

./customerror.module, line 33
Enables custom 404 (not found) and 403 (access denied) pages in Drupal.

Code

function _customerror_fetch_error($error_code) {
  $errors = _customerror_enum_errors();
  $ret = isset($errors[$error_code]) ? $errors[$error_code] : array(
    t('unknown error: @error_code', array(
      '@error_code' => $error_code,
    )),
    t('This error has no description.'),
  );
  return $ret;
}