summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Coutand2012-04-05 09:16:06 (EDT)
committer Eugene Tarassov2012-04-05 13:58:21 (EDT)
commitb14f44764789ade7167bc92330dbf502c4ec4433 (patch)
tree6acad039b72aeb79bb9e1e7439006a332e64aa20
parentbe86faea25c88368b8165f9517131f78de2e85a4 (diff)
downloadorg.eclipse.tcf.agent-b14f44764789ade7167bc92330dbf502c4ec4433.zip
org.eclipse.tcf.agent-b14f44764789ade7167bc92330dbf502c4ec4433.tar.gz
org.eclipse.tcf.agent-b14f44764789ade7167bc92330dbf502c4ec4433.tar.bz2
Improve context query syntax error messages
-rw-r--r--agent/tcf/services/contextquery.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/tcf/services/contextquery.c b/agent/tcf/services/contextquery.c
index 21a7ebb..0f0b094 100644
--- a/agent/tcf/services/contextquery.c
+++ b/agent/tcf/services/contextquery.c
@@ -75,7 +75,7 @@ int parse_context_query(const char * q) {
str_buf = (char *)tmp_alloc(str_max);
if ((abs_path = *q == '/') != 0) q++;
if (*q == 0) {
- set_errno(ERR_OTHER, "Invalid context query syntax");
+ set_errno(ERR_OTHER, "Invalid context query syntax: missing context name, property or wildcard");
return -1;
}
while (*q) {
@@ -89,7 +89,7 @@ int parse_context_query(const char * q) {
add_char(*q++);
}
if ((*q != 0) && (*q != '/')) {
- set_errno(ERR_OTHER, "Invalid context query syntax");
+ set_errno(ERR_OTHER, "Invalid context query syntax: * and ** are the only wildcards available");
return -1;
}
}
@@ -99,7 +99,7 @@ int parse_context_query(const char * q) {
(((*q < '0') || (*q > '9')) &&
((*q < 'a') || (*q > 'z')) &&
((*q < 'A') || (*q > 'Z')))) {
- set_errno(ERR_OTHER, "Invalid context query syntax");
+ set_errno(ERR_OTHER, "Invalid context query syntax: unquoted strings must only contain alphanumerical characters or '_'");
return -1;
}
@@ -119,7 +119,7 @@ int parse_context_query(const char * q) {
add_char(*q++);
}
else {
- set_errno(ERR_OTHER, "Invalid context query syntax");
+ set_errno(ERR_OTHER, "Invalid context query syntax: \" and \\ are the only characters that can be escaped");
return -1;
}
}