1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) Index Data
3 * See the file LICENSE for details.
7 * \brief Implements CQL error code map to description string.
16 * The error-messages associated with these codes are taken from
17 * the SRW diagnostic specifications at
18 * http://www.loc.gov/standards/sru/diagnostics-list.html
20 const char *cql_strerror(int code) {
23 case 10: return "Illegal query";
24 case 11: return "Unsupported query type (XCQL vs CQL)";
25 case 12: return "Too many characters in query";
26 case 13: return "Unbalanced or illegal use of parentheses";
27 case 14: return "Unbalanced or illegal use of quotes";
28 case 15: return "Illegal or unsupported context set";
29 case 16: return "Illegal or unsupported index";
30 case 17: return "Illegal or unsupported combination of index and context set";
31 case 18: return "Illegal or unsupported combination of indexes";
32 case 19: return "Illegal or unsupported relation";
33 case 20: return "Illegal or unsupported relation modifier";
34 case 21: return "Illegal or unsupported combination of relation modifers";
35 case 22: return "Illegal or unsupported combination of relation and index";
36 case 23: return "Too many characters in term";
37 case 24: return "Illegal combination of relation and term";
38 case 25: return "Special characters not quoted in term";
39 case 26: return "Non special character escaped in term";
40 case 27: return "Empty term unsupported";
41 case 28: return "Masking character not supported";
42 case 29: return "Masked words too short";
43 case 30: return "Too many masking characters in term";
44 case 31: return "Anchoring character not supported";
45 case 32: return "Anchoring character in illegal or unsupported position";
46 case 33: return "Combination of proximity/adjacency and masking characters not supported";
47 case 34: return "Combination of proximity/adjacency and anchoring characters not supported";
48 case 35: return "Terms only exclusion (stop) words";
49 case 36: return "Term in invalid format for index or relation";
50 case 37: return "Illegal or unsupported boolean operator";
51 case 38: return "Too many boolean operators in query";
52 case 39: return "Proximity not supported";
53 case 40: return "Illegal or unsupported proximity relation";
54 case 41: return "Illegal or unsupported proximity distance";
55 case 42: return "Illegal or unsupported proximity unit";
56 case 43: return "Illegal or unsupported proximity ordering";
57 case 44: return "Illegal or unsupported combination of proximity modifiers";
58 case 45: return "Context set name (prefix) assigned to multiple identifiers";
62 sprintf(buf, "Unknown CQL error #%d", code);
68 * c-file-style: "Stroustrup"
69 * indent-tabs-mode: nil
71 * vim: shiftwidth=4 tabstop=8 expandtab