Error Page Internals
[Error Pages API]
|
Classes | |
| struct | ErrorDynamicPageInfo |
Defines | |
| #define | CVT_BUF_SZ 512 |
Functions | |
| CBDATA_CLASS_INIT (ErrorState) | |
| err_type & | operator++ (err_type &anErr) |
| int | operator- (err_type const &anErr, err_type const &anErr2) |
| static const char * | errorFindHardText (err_type type) |
| static char * | errorLoadText (const char *page_name) |
| static char * | errorTryLoadText (const char *page_name, const char *dir, bool silent) |
| static ErrorDynamicPageInfo * | errorDynamicPageInfoCreate (int id, const char *page_name) |
| static void | errorDynamicPageInfoDestroy (ErrorDynamicPageInfo *info) |
| static int | errorPageId (const char *page_name) |
| static const char * | errorPageName (int pageId) |
Variables | |
| struct { | |
| int type | |
| const char * text | |
| } | error_hard_text [] |
| static Vector < ErrorDynamicPageInfo * > | ErrorDynamicPages |
| static const int | error_hard_text_count = sizeof(error_hard_text) / sizeof(*error_hard_text) |
| static char ** | error_text = NULL |
| static int | error_page_count = 0 |
| static MemBuf | error_stylesheet |
Detailed Description
Abstract:
These routines are used to generate error messages to be sent to clients. The error type is used to select between the various message formats. (formats are stored in the Config.errorDirectory)
Define Documentation
| #define CVT_BUF_SZ 512 |
Definition at line 595 of file errorpage.cc.
Function Documentation
| CBDATA_CLASS_INIT | ( | ErrorState | ) |
| static ErrorDynamicPageInfo * errorDynamicPageInfoCreate | ( | int | id, | |
| const char * | page_name | |||
| ) | [static] |
Definition at line 321 of file errorpage.cc.
References ErrorDynamicPageInfo::id, ErrorDynamicPageInfo::page_name, and xstrdup().
Referenced by errorReservePageId().
| static void errorDynamicPageInfoDestroy | ( | ErrorDynamicPageInfo * | info | ) | [static] |
Definition at line 331 of file errorpage.cc.
References assert, ErrorDynamicPageInfo::page_name, and safe_free.
Referenced by errorClean().
| static const char * errorFindHardText | ( | err_type | type | ) | [static] |
Definition at line 219 of file errorpage.cc.
References error_hard_text, error_hard_text_count, i, and NULL.
Referenced by errorInitialize().
| static char * errorLoadText | ( | const char * | page_name | ) | [static] |
Load into the in-memory error text Index a file probably available at: (a) admin specified custom directory (error_directory) (b) default language translation directory (error_default_language) (c) English sub-directory where errors should ALWAYS exist
test error_directory configured location
Definition at line 239 of file errorpage.cc.
References Config, DBG_CRITICAL, debugs, DEFAULT_SQUID_ERROR_DIR, SquidConfig::errorDirectory, errorTryLoadText(), fatal(), NULL, and text.
Referenced by errorInitialize().
| static int errorPageId | ( | const char * | page_name | ) | [static] |
Definition at line 340 of file errorpage.cc.
References ERR_MAX, ERR_NONE, err_type_str, i, Vector< E >::items, ErrorDynamicPageInfo::page_name, and Vector< E >::size().
Referenced by errorReservePageId().
| static const char* errorPageName | ( | int | pageId | ) | [static] |
Definition at line 372 of file errorpage.cc.
References ERR_MAX, ERR_NONE, err_type_str, Vector< E >::items, ErrorDynamicPageInfo::page_name, and Vector< E >::size().
Referenced by ErrorState::BuildContent(), ErrorState::BuildHttpReply(), ErrorState::Convert(), and ErrorState::Dump().
| static char * errorTryLoadText | ( | const char * | page_name, | |
| const char * | dir, | |||
| bool | silent = false | |||
| ) | [static] |
Definition at line 273 of file errorpage.cc.
References MemBuf::append(), MemBuf::buf, MemBuf::clean(), DBG_CRITICAL, debugs, FD_READ_METHOD, file_close(), file_open(), HERE, MemBuf::init(), NULL, O_TEXT, text, xstrdup(), and xstrerror().
Referenced by ErrorState::BuildContent(), errorInitialize(), and errorLoadText().
Definition at line 135 of file errorpage.cc.
Definition at line 143 of file errorpage.cc.
Variable Documentation
struct { ... }
error_hard_text[] [static] |
- Note:
- hard coded error messages are not appended with S automagically to give you more control on the format
Referenced by errorFindHardText().
const int error_hard_text_count = sizeof(error_hard_text) / sizeof(*error_hard_text) [static] |
Definition at line 115 of file errorpage.cc.
Referenced by errorFindHardText().
int error_page_count = 0 [static] |
Definition at line 121 of file errorpage.cc.
MemBuf error_stylesheet [static] |
Definition at line 124 of file errorpage.cc.
char** error_text = NULL [static] |
Definition at line 118 of file errorpage.cc.
Vector<ErrorDynamicPageInfo *> ErrorDynamicPages [static] |
Definition at line 110 of file errorpage.cc.
const { ... } text [inherited] |
Definition at line 89 of file errorpage.cc.
int { ... } type [inherited] |
Definition at line 88 of file errorpage.cc.
Search
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Help Out
- Getting Squid
- Donate
- Squid Deployment Case-Studies
Documentation
- FAQ | Wiki | Book
- Configuration Reference
- Configuration Guide - Visolve
- Configuration Examples
- Users guide
- Non-English
- Security Advisories
- More...
Support
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
