Error Page Internals
[Error Pages API]

Collaboration diagram for Error Page Internals:

Classes

struct  ErrorDynamicPageInfo

Defines

#define CVT_BUF_SZ   512

Functions

 CBDATA_CLASS_INIT (ErrorState)
err_typeoperator++ (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 ErrorDynamicPageInfoerrorDynamicPageInfoCreate (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]
static const char* errorPageName ( int  pageId  )  [static]
static char * errorTryLoadText ( const char *  page_name,
const char *  dir,
bool  silent = false 
) [static]
err_type& operator++ ( err_type anErr  ) 

Definition at line 135 of file errorpage.cc.

int operator- ( err_type const &  anErr,
err_type const &  anErr2 
)

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.

Definition at line 124 of file errorpage.cc.

char** error_text = NULL [static]

Definition at line 118 of file errorpage.cc.

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

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors