Annotation of libwww/Library/src/HTError.html, revision 2.1

2.1     ! frystyk     1: <HTML>
        !             2: <HEAD>
        !             3: <TITLE>Error message module for libwww</TITLE>
        !             4: <NEXTID N="z1">
        !             5: </HEAD>
        !             6: <BODY>
        !             7: <H1>Error reporting functions</H1>
        !             8: 
        !             9: <PRE>
        !            10: #ifndef HTERROR_H
        !            11: #define HTERROR_H
        !            12: </PRE>
        !            13: 
        !            14: <PRE>
        !            15: typedef enum _HTErrorShow {
        !            16:     HT_ERR_SHOW_WARNING   = 0x1,
        !            17:     HT_ERR_SHOW_NON_FATAL = 0x2,
        !            18:     HT_ERR_SHOW_FATAL     = 0x4,
        !            19:     HT_ERR_SHOW_PARS     = 0x8,
        !            20:     HT_ERR_SHOW_LOCATION  = 0x10,
        !            21:     HT_ERR_SHOW_IGNORE    = 0x20,
        !            22:     HT_ERR_SHOW_FIRST     = 0x40,
        !            23:     HT_ERR_SHOW_ALL      = 0x3F
        !            24: } HTErrorShow;
        !            25: 
        !            26: typedef enum _HTErrSeverity {
        !            27:     WARNING              = 0x1,
        !            28:     NON_FATAL            = 0x2,
        !            29:     FATAL                = 0x4
        !            30: } HTErrSeverity;
        !            31: </PRE>
        !            32: 
        !            33: <H2>Error Numbers</H2>
        !            34: 
        !            35: <B>Note:</B> All non-HTTP error codes have index numbers &gt; HTERR_HTTP_CODES, and they will not be shown in the error-message generated.
        !            36: <PRE>
        !            37: typedef enum _HTErrorElement {
        !            38:        HTERR_OK = 0,                                           /* 200 */
        !            39:        HTERR_CREATED,                                          /* 201 */
        !            40:        HTERR_ACCEPTED,                                         /* 202 */
        !            41:        HTERR_PARTIAL,                                          /* 203 */
        !            42:        HTERR_NO_RESPONSE,                                      /* 204 */
        !            43:        HTERR_MOVED,                                            /* 301 */
        !            44:        HTERR_FOUND,                                            /* 302 */
        !            45:        HTERR_METHOD,                                           /* 303 */
        !            46:        HTERR_NOT_MODIFIED,                                     /* 304 */
        !            47:        HTERR_BAD_REQUEST,                                      /* 400 */
        !            48:        HTERR_UNAUTHORIZED,                                     /* 401 */
        !            49:        HTERR_PAYMENT_REQUIRED,                                 /* 402 */
        !            50:        HTERR_FORBIDDEN,                                        /* 403 */
        !            51:        HTERR_NOT_FOUND,                                        /* 404 */
        !            52:        HTERR_INTERNAL,                                         /* 500 */
        !            53:        HTERR_NOT_IMPLEMENTED,                                  /* 501 */
        !            54:        HTERR_HTTP_CODES_END,    /* Put all non-HTTP status codes after this */
        !            55:        HTERR_NO_REMOTE_HOST,
        !            56:        HTERR_FTP_SERVER,
        !            57:        HTERR_FTP_NO_RESPONSE,
        !            58:        HTERR_TIME_OUT,
        !            59:        HTERR_ELEMENTS                      /* This MUST be the last element */
        !            60: } HTErrorElement;
        !            61: </PRE>
        !            62: 
        !            63: <H2>Public Error Functions</H2>
        !            64: 
        !            65: <H3>Initializing Help Pages</H3>
        !            66: 
        !            67: In order to initialize the help pages, that refer to any further explanation of the error or warning, a path must be given.
        !            68: <PRE>
        !            69: extern void HTErrorHelpInit PARAMS((char * pathname));
        !            70: </PRE>
        !            71: 
        !            72: <H3>Add an Error Message</H3>
        !            73: 
        !            74: This function adds an error message to the error_stack list in the HTRequest
        !            75: structure.
        !            76: <PRE>
        !            77: extern void HTErrorAdd PARAMS((        HTRequest *     request,
        !            78:                                HTErrSeverity   severity,
        !            79:                                BOOL            ignore,
        !            80:                                int             element,
        !            81:                                void *          par,
        !            82:                                unsigned int    par_length,
        !            83:                                char *          where));
        !            84: </PRE>
        !            85: 
        !            86: <H3>Ignoring an Error Message</H3>
        !            87: 
        !            88: If an error message is not to be send to the user, e.g., output to the stream, then the ignore flag must be turn on. This function turns it on for the latest error appended to the list.
        !            89: <PRE>
        !            90: extern void HTErrorIgnore PARAMS((HTRequest * request));
        !            91: </PRE>
        !            92: 
        !            93: <H3>Generating an Error Message</H3>
        !            94: 
        !            95: This function writes to the outpu stream for the request.
        !            96: <PRE>
        !            97: extern void HTErrorMsg    PARAMS((HTRequest * request));
        !            98: </PRE>
        !            99: 
        !           100: <H3>Freeing an Error List</H3>
        !           101: 
        !           102: This is normally done when the HTRequest structure is freed but it might be done at any other time in order to ignore a whole series of errors.
        !           103: <PRE>
        !           104: extern void HTErrorFree   PARAMS((HTRequest * request));
        !           105: </PRE>
        !           106: 
        !           107: <PRE>
        !           108: #endif
        !           109: </PRE>
        !           110: end
        !           111: </BODY>
        !           112: </HTML>
        !           113: 
        !           114: 

Webmaster