1 | /***************************************
2 | $Revision: 1.5 $
3 |
4 | Utilities (ut). er_UT_errors.h - definition of errors for the utilities mod.
5 |
6 | Status: NOT REVUED, TESTED,
7 |
8 | Design and implementation by: Marek Bukowy
9 |
10 | ******************/ /******************
11 | Copyright (c) 1999,2000,2001,2002 RIPE NCC
12 |
13 | All Rights Reserved
14 |
15 | Permission to use, copy, modify, and distribute this software and its
16 | documentation for any purpose and without fee is hereby granted,
17 | provided that the above copyright notice appear in all copies and that
18 | both that copyright notice and this permission notice appear in
19 | supporting documentation, and that the name of the author not be
20 | used in advertising or publicity pertaining to distribution of the
21 | software without specific, written prior permission.
22 |
23 | THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
24 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
25 | AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
26 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
27 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
28 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 | ***************************************/
30 |
31 |
32 | /* step 1 */
33 |
34 | typedef enum {
35 | LOW_UT_OK = 0,
36 | LOW_UT_OUTMEM,
37 | LOW_UT_NOMEMLOG,
38 | LOW_UT_DUPCLOSE
39 | } UT_err_code_t;
40 |
41 | /* step 2 */
42 |
43 | #define UT_OK ER_SEV_I + (FAC_UT<<16) + LOW_UT_OK
44 | #define UT_OUTMEM ER_SEV_F + (FAC_UT<<16) + LOW_UT_OUTMEM
45 | #define UT_NOMEMLOG ER_SEV_W + (FAC_UT<<16) + LOW_UT_NOMEMLOG
46 | #define UT_DUPCLOSE ER_SEV_E + (FAC_UT<<16) + LOW_UT_DUPCLOSE
47 |
48 | /* step 3 */
49 |
50 | #ifdef ER_IMPL
51 |
52 | er_list_t UT_mod_err[]={
53 | { ERDUP(UT_OK), "OK" },
54 | { ERDUP(UT_OUTMEM), "out of memory" },
55 | { ERDUP(UT_NOMEMLOG), "logging not supported" },
56 | { ERDUP(UT_DUPCLOSE), "duplicate close detected" },
57 | ER_LASTTXT
58 | };
59 |
60 | #endif /* ER_IMPL */
61 |