2
include/common/errors.h
3
Global error macros and constants
5
Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
7
This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation, version 2.1
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
#ifndef _COMMON_ERRORS_H
23
#define _COMMON_ERRORS_H
25
/* These flags may be used in various functions which are called from within
26
* loops (eg: to start all listeners from all proxies). They provide enough
27
* information to let the caller decide what to do. ERR_WARN and ERR_ALERT
28
* do not indicate any error, just that a message has been put in a shared
29
* buffer in order to be displayed by the caller.
31
#define ERR_NONE 0x00 /* no error, no message returned */
32
#define ERR_RETRYABLE 0x01 /* retryable error, may be cumulated */
33
#define ERR_FATAL 0x02 /* fatal error, may be cumulated */
34
#define ERR_ABORT 0x04 /* it's preferable to end any possible loop */
35
#define ERR_WARN 0x08 /* a warning message has been returned */
36
#define ERR_ALERT 0x10 /* an alert message has been returned */
38
#define ERR_CODE (ERR_RETRYABLE|ERR_FATAL|ERR_ABORT) /* mask */
40
#endif /* _COMMON_ERRORS_H */