You are here

function _customerror_fetch_error in Customerror 5

Same name and namespace in other branches
  1. 6 customerror.module \_customerror_fetch_error()
  2. 7 customerror.module \_customerror_fetch_error()
1 call to _customerror_fetch_error()
customerror_page in ./customerror.module

File

./customerror.module, line 27
Enables custom 404 (not found) and 403 (access denied) pages in Drupal with no need for creating real nodes under taxonomies

Code

function _customerror_fetch_error($code) {
  $errors = _customerror_enum_errors();
  $result = t('unknown error: @error_code', array(
    '@error_code' => $code,
  ));
  foreach ($errors as $code => $desc) {
    if ($error_code == $code) {
      $result = $desc;
    }
  }
  return $result;
}