From f9a3b37583bc25c9ba7318fd743209d7c970e675 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 17 May 2006 03:43:44 +0000 Subject: [PATCH] add helpful error messages for onblur validation --- src/xml-rpc.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/xml-rpc.c b/src/xml-rpc.c index e6b79cf4..e7426186 100644 --- a/src/xml-rpc.c +++ b/src/xml-rpc.c @@ -134,7 +134,22 @@ void xml_set_config(WS_CONNINFO *pwsc) { if((err=conf_set_string(section,key,value,verify_only)!=CONF_E_SUCCESS)) { /* should return text error from conf_ */ - xml_return_error(pwsc,500,"conf_set_string: error"); + switch(err) { + case CONF_E_BADELEMENT: + xml_return_error(pwsc,500,"Unknown section/key pair"); + break; + case CONF_E_PATHEXPECTED: + xml_return_error(pwsc,500,"Expecting valid path"); + break; + case CONF_E_INTEXPECTED: + xml_return_error(pwsc,500,"Expecting integer value"); + break; + case CONF_E_NOTWRITABLE: + xml_return_error(pwsc,500,"Config file not writable"); + break; + default: + xml_return_error(pwsc,500,"conf_set_string: error"); + } return; }