Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

apreq_error.h

Go to the documentation of this file.
00001 /*
00002 **  Copyright 2003-2005  The Apache Software Foundation
00003 **
00004 **  Licensed under the Apache License, Version 2.0 (the "License");
00005 **  you may not use this file except in compliance with the License.
00006 **  You may obtain a copy of the License at
00007 **
00008 **      http://www.apache.org/licenses/LICENSE-2.0
00009 **
00010 **  Unless required by applicable law or agreed to in writing, software
00011 **  distributed under the License is distributed on an "AS IS" BASIS,
00012 **  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013 **  See the License for the specific language governing permissions and
00014 **  limitations under the License.
00015 */
00016 
00017 #ifndef APREQ_ERROR_H
00018 #define APREQ_ERROR_H
00019 
00020 #include "apr_errno.h"
00021 #include "apreq.h"
00022 
00023 #ifdef  __cplusplus
00024  extern "C" {
00025 #endif 
00026 
00031 APREQ_DECLARE(char *)
00032 apreq_strerror(apr_status_t s, char *buf, apr_size_t bufsize);
00033 
00042 #ifndef APR_EBADARG
00043 #define APR_EBADARG                APR_BADARG   /* XXX: don't use APR_BADARG */
00044 #endif
00045 
00047 #define APREQ_ERROR_GENERAL        APR_OS_START_USERERR
00049 #define APREQ_ERROR_TAINTED        (APREQ_ERROR_GENERAL + 1)
00051 #define APREQ_ERROR_INTERRUPT      (APREQ_ERROR_GENERAL + 2)
00052 
00054 #define APREQ_ERROR_BADDATA        (APREQ_ERROR_GENERAL  + 10)
00056 #define APREQ_ERROR_BADCHAR        (APREQ_ERROR_BADDATA  +  1)
00058 #define APREQ_ERROR_BADSEQ         (APREQ_ERROR_BADDATA  +  2)
00060 #define APREQ_ERROR_BADATTR        (APREQ_ERROR_BADDATA  +  3)
00062 #define APREQ_ERROR_BADHEADER      (APREQ_ERROR_BADDATA  +  4)
00064 #define APREQ_ERROR_BADUTF8        (APREQ_ERROR_BADDATA  +  5)
00065 
00067 #define APREQ_ERROR_NODATA         (APREQ_ERROR_GENERAL  + 20)
00069 #define APREQ_ERROR_NOTOKEN        (APREQ_ERROR_NODATA   +  1)
00071 #define APREQ_ERROR_NOATTR         (APREQ_ERROR_NODATA   +  2)
00073 #define APREQ_ERROR_NOHEADER       (APREQ_ERROR_NODATA   +  3)
00075 #define APREQ_ERROR_NOPARSER       (APREQ_ERROR_NODATA   +  4)
00076 
00077 
00079 #define APREQ_ERROR_MISMATCH       (APREQ_ERROR_GENERAL  + 30)
00081 #define APREQ_ERROR_OVERLIMIT      (APREQ_ERROR_MISMATCH +  1)
00083 #define APREQ_ERROR_UNDERLIMIT     (APREQ_ERROR_MISMATCH +  2)
00085 #define APREQ_ERROR_NOTEMPTY       (APREQ_ERROR_MISMATCH +  3)
00086 
00087 
00088 #ifdef __cplusplus
00089  }
00090 #endif
00091 
00092 #endif /* APREQ_ERROR_H */