include/apreq_error.h

Go to the documentation of this file.
00001 /*
00002 **  Licensed to the Apache Software Foundation (ASF) under one or more
00003 ** contributor license agreements.  See the NOTICE file distributed with
00004 ** this work for additional information regarding copyright ownership.
00005 ** The ASF licenses this file to You under the Apache License, Version 2.0
00006 ** (the "License"); you may not use this file except in compliance with
00007 ** the License.  You may obtain a copy of the License at
00008 **
00009 **      http://www.apache.org/licenses/LICENSE-2.0
00010 **
00011 **  Unless required by applicable law or agreed to in writing, software
00012 **  distributed under the License is distributed on an "AS IS" BASIS,
00013 **  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 **  See the License for the specific language governing permissions and
00015 **  limitations under the License.
00016 */
00017 
00018 #ifndef APREQ_ERROR_H
00019 #define APREQ_ERROR_H
00020 
00021 #include "apr_errno.h"
00022 #include "apreq.h"
00023 
00024 #ifdef  __cplusplus
00025  extern "C" {
00026 #endif
00027 
00032 APREQ_DECLARE(char *)
00033 apreq_strerror(apr_status_t s, char *buf, apr_size_t bufsize);
00034 
00043 #ifndef APR_EBADARG
00044 
00048 #define APR_EBADARG                APR_BADARG   /* XXX: don't use APR_BADARG */
00049 #endif
00050 
00052 #define APREQ_ERROR_GENERAL        APR_OS_START_USERERR
00053 
00054 #define APREQ_ERROR_TAINTED        (APREQ_ERROR_GENERAL + 1)
00055 
00056 #define APREQ_ERROR_INTERRUPT      (APREQ_ERROR_GENERAL + 2)
00057 
00059 #define APREQ_ERROR_BADDATA        (APREQ_ERROR_GENERAL  + 10)
00060 
00061 #define APREQ_ERROR_BADCHAR        (APREQ_ERROR_BADDATA  +  1)
00062 
00063 #define APREQ_ERROR_BADSEQ         (APREQ_ERROR_BADDATA  +  2)
00064 
00065 #define APREQ_ERROR_BADATTR        (APREQ_ERROR_BADDATA  +  3)
00066 
00067 #define APREQ_ERROR_BADHEADER      (APREQ_ERROR_BADDATA  +  4)
00068 
00069 #define APREQ_ERROR_BADUTF8        (APREQ_ERROR_BADDATA  +  5)
00070 
00072 #define APREQ_ERROR_NODATA         (APREQ_ERROR_GENERAL  + 20)
00073 
00074 #define APREQ_ERROR_NOTOKEN        (APREQ_ERROR_NODATA   +  1)
00075 
00076 #define APREQ_ERROR_NOATTR         (APREQ_ERROR_NODATA   +  2)
00077 
00078 #define APREQ_ERROR_NOHEADER       (APREQ_ERROR_NODATA   +  3)
00079 
00080 #define APREQ_ERROR_NOPARSER       (APREQ_ERROR_NODATA   +  4)
00081 
00082 
00084 #define APREQ_ERROR_MISMATCH       (APREQ_ERROR_GENERAL  + 30)
00085 
00086 #define APREQ_ERROR_OVERLIMIT      (APREQ_ERROR_MISMATCH +  1)
00087 
00088 #define APREQ_ERROR_UNDERLIMIT     (APREQ_ERROR_MISMATCH +  2)
00089 
00090 #define APREQ_ERROR_NOTEMPTY       (APREQ_ERROR_MISMATCH +  3)
00091 
00092 
00093 #ifdef __cplusplus
00094  }
00095 #endif
00096 
00097 #endif /* APREQ_ERROR_H */