2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: diagsrw.c,v 1.2 2005-01-15 19:47:13 adam Exp $
9 * \brief SRW/SRU Diagnostic messages.
17 } yaz_srw_codes [] = {
18 {1, "Permanent system error"},
19 {2, "System temporarily unavailable"},
20 {3, "Authentication error"},
21 {4, "Unsupported operation"},
22 {5, "Unsupported version"},
23 {6, "Unsupported parameter value"},
24 {7, "Mandatory parameter not supplied"},
25 {8, "Unsupported parameter"},
26 /* Diagnostics Relating to CQL */
27 {10, "Query syntax error"},
28 {11, "Unsupported query type"},
29 {12, "Too many characters in query"},
30 {13, "Invalid or unsupported use of parentheses"},
31 {14, "Invalid or unsupported use of quotes"},
32 {15, "Unsupported context set"},
33 {16, "Unsupported index"},
34 {17, "Unsupported combination of index and context set"},
35 {18, "Unsupported combination of indexes"},
36 {19, "Unsupported relation"},
37 {20, "Unsupported relation modifier"},
38 {21, "Unsupported combination of relation modifers"},
39 {22, "Unsupported combination of relation and index"},
40 {23, "Too many characters in term"},
41 {24, "Unsupported combination of relation and term"},
42 {25, "Special characters not quoted in term"},
43 {26, "Non special character escaped in term"},
44 {27, "Empty term unsupported"},
45 {28, "Masking character not supported"},
46 {29, "Masked words too short"},
47 {30, "Too many masking characters in term"},
48 {31, "Anchoring character not supported"},
49 {32, "Anchoring character in unsupported position"},
50 {33, "Combination of proximity/adjacency and masking characters not supported"},
51 {34, "Combination of proximity/adjacency and anchoring characters not supported"},
52 {35, "Terms only exclusion stopwords"},
53 {36, "Term in invalid format for index or relation"},
54 {37, "Unsupported boolean operator"},
55 {38, "Too many boolean operators in query"},
56 {39, "Proximity not supported"},
57 {40, "Unsupported proximity relation"},
58 {41, "Unsupported proximity distance"},
59 {42, "Unsupported proximity unit"},
60 {43, "Unsupported proximity ordering"},
61 {44, "Unsupported combination of proximity modifiers"},
62 {45, "Prefix assigned to multiple identifiers"},
63 {46, "Unsupported boolean modifier"},
64 {47, "Cannot process query; reason unknown"},
65 {48, "Query feature unsupported"},
66 {49, "Masking character in unsupported position"},
67 /* Diagnostics Relating to Result Sets */
68 {50, "Result sets not supported"},
69 {51, "Result set does not exist"},
70 {52, "Result set temporarily unavailable"},
71 {53, "Result sets only supported for retrieval"},
72 {54, "Retrieval may only occur from an existing result set"},
73 {55, "Combination of result sets with search terms not supported"},
74 {56, "Only combination of single result set with search terms supported"},
75 {57, "Result set created but no records available"},
76 {58, "Result set created with unpredictable partial results available"},
77 {59, "Result set created with valid partial results available"},
78 {60, "Result set no created: too many records retrieved"},
79 /* Diagnostics Relating to Records */
80 {61, "First record position out of range"},
81 {62, "Negative number of records requested"},
82 {63, "System error in retrieving records"},
83 {64, "Record temporarily unavailable"},
84 {65, "Record does not exist"},
85 {66, "Unknown schema for retrieval"},
86 {67, "Record not available in this schema"},
87 {68, "Not authorised to send record"},
88 {69, "Not authorised to send record in this schema"},
89 {70, "Record too large to send"},
90 {71, "Unsupported record packing"},
91 {72, "XPath retrieval unsupported"},
92 {73, "XPath expression contains unsupported feature"},
93 {74, "Unable to evaluate XPath expression"},
94 /* Diagnostics Relating to Sorting */
95 {80, "Sort not supported"},
96 {81, "Unsupported sort type"},
97 {82, "Unsupported sort sequence"},
98 {83, "Too many records to sort"},
99 {84, "Too many sort keys to sort"},
100 {85, "Duplicate sort keys"},
101 {86, "Cannot sort: incompatible record formats"},
102 {87, "Unsupported schema for sort"},
103 {88, "Unsupported path for sort"},
104 {89, "Path unsupported for schema"},
105 {90, "Unsupported direction value"},
106 {91, "Unsupported case value"},
107 {92, "Unsupported missing value action"},
108 /* Diagnostics Relating to Explain */
109 {100, "Explain not supported"},
110 {101, "Explain request type not supported (SOAP vs GET)"},
111 {102, "Explain record temporarily unavailable"},
112 /* Diagnostics Relating to Stylesheets */
113 {110, "Stylesheets not supported"},
114 {111, "Unsupported stylesheet"},
115 /* Diagnostics relating to Scan */
116 {120, "Response position out of range"},
117 {121, "Too many terms requested"},
121 const char *yaz_diag_srw_str (int code)
124 for (i = 0; yaz_srw_codes[i].code; i++)
125 if (yaz_srw_codes[i].code == code)
126 return yaz_srw_codes[i].msg;