blob: 449f2a873c6794817bebbdf7d8e24b4c9df93df7 [file] [log] [blame]
Willy Tarreaud740bab2007-10-28 11:14:07 +01001/*
2 include/common/errors.h
3 Global error macros and constants
4
5 Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
6
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
10 exclusively.
11
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.
16
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
20*/
21
22#ifndef _COMMON_ERRORS_H
23#define _COMMON_ERRORS_H
24
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.
30 */
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 */
37
Willy Tarreau6fb42e02007-10-28 17:02:33 +010038#define ERR_CODE (ERR_RETRYABLE|ERR_FATAL|ERR_ABORT) /* mask */
Willy Tarreaud740bab2007-10-28 11:14:07 +010039
40#endif /* _COMMON_ERRORS_H */
41
42/*
43 * Local variables:
44 * c-indent-level: 8
45 * c-basic-offset: 8
46 * End:
47 */