1 | /* |
2 | * Legal Notice |
3 | * |
4 | * This document and associated source code (the "Work") is a part of a |
5 | * benchmark specification maintained by the TPC. |
6 | * |
7 | * The TPC reserves all right, title, and interest to the Work as provided |
8 | * under U.S. and international laws, including without limitation all patent |
9 | * and trademark rights therein. |
10 | * |
11 | * No Warranty |
12 | * |
13 | * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION |
14 | * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE |
15 | * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER |
16 | * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, |
17 | * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, |
18 | * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR |
19 | * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF |
20 | * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE. |
21 | * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, |
22 | * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT |
23 | * WITH REGARD TO THE WORK. |
24 | * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO |
25 | * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE |
26 | * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS |
27 | * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, |
28 | * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, |
29 | * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT |
30 | * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD |
31 | * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. |
32 | * |
33 | * Contributors: |
34 | * Gradient Systems |
35 | */ |
36 | #define QERR_OK 0 |
37 | #define QERR_NO_FILE -1 |
38 | #define QERR_LINE_TOO_LONG -2 |
39 | #define QERR_NO_MEMORY -3 |
40 | #define QERR_SYNTAX -4 |
41 | #define QERR_RANGE_ERROR -5 |
42 | #define QERR_NON_UNIQUE -6 |
43 | #define QERR_BAD_NAME -7 |
44 | #define QERR_DEFINE_OVERFLOW -8 |
45 | #define QERR_INVALID_TAG -9 |
46 | #define QERR_READ_FAILED -10 |
47 | #define QERR_TEMPLATE_OVERFLOW -11 |
48 | #define QERR_ONE_WORKLOAD -12 |
49 | #define QERR_CLASS_REDEFINE -13 |
50 | #define QERR_DUP_QUERY -14 |
51 | #define QERR_OPEN_FAILED -15 |
52 | #define QERR_NOT_IMPLEMENTED -16 |
53 | #define QERR_STR_TRUNCATED -17 |
54 | #define QERR_BAD_STRING -18 |
55 | #define QERR_WRITE_FAILED -19 |
56 | #define QERR_NO_TYPE -20 |
57 | #define QERR_NO_WEIGHT -21 |
58 | #define QERR_NO_LIMIT -22 |
59 | #define QERR_BAD_PERCENT -23 |
60 | #define QERR_ROWCOUNT_NAME -24 |
61 | #define QERR_NO_EXPR -25 |
62 | #define QERR_NO_INIT -26 |
63 | #define QERR_NO_NORMAL_RANGE -27 |
64 | #define QERR_UNBALANCED -28 |
65 | #define QERR_INCLUDE_OVERFLOW -29 |
66 | #define QERR_BAD_PARAMS -30 |
67 | #define DBGEN_ERROR_HIERACHY_ORDER -31 |
68 | #define QERR_NAMES_EARLY -32 |
69 | #define QERR_ARG_OVERFLOW -33 |
70 | #define QERR_INVALID_ARG -34 |
71 | #define QERR_RANGE_LIST -35 |
72 | #define QERR_BAD_SCALE -36 |
73 | #define QERR_BAD_PARAM -37 |
74 | #define QERR_BAD_JOIN -38 |
75 | #define QERR_TABLE_NOP -39 |
76 | #define QERR_TABLE_CHILD -40 |
77 | #define QERR_CMDLINE_TOO_LONG -41 |
78 | #define QERR_NO_QUERYLIST -42 |
79 | #define QERR_QUERY_RANGE -43 |
80 | #define QERR_MODIFIED_PARAM -44 |
81 | #define QERR_RANGE_OVERRUN -45 |
82 | #define QERR_QUALIFICATION_SCALE -46 |
83 | #define QERR_TABLE_UPDATE -47 |
84 | #define MAX_ERROR 47 |
85 | |
86 | typedef struct ERR_MSG_T { |
87 | int flags; |
88 | char *prompt; |
89 | } err_msg_t; |
90 | |
91 | /* Flag determine formating */ |
92 | #define EFLG_NO_ARG 0x0000 |
93 | #define EFLG_STR_ARG 0x0001 |
94 | #define EFLG_ARG_MASK 0x0001 |
95 | |
96 | #define EFLG_SYSTEM 0x0002 |
97 | |
98 | int ReportError(int nError, char *arg, int bExit); |
99 | int ReportErrorNoLine(int nError, char *arg, int bExit); |
100 | void SetErrorGlobals(char *szFileName, int *pnLineNumber); |
101 | |