Date: Sun Sep 21 11:24:20 CEST 2003
User: Jani Taskinen
Directory: srm/main/src
Log Message:
[0.05]
- Changed the error messages to be more user-friendly and readable.
Modified files:
srm/main/src/srm_error.h (version: 1.4)
srm/main/src/srm_functions.c (version: 1.2)
srm/main/src/srm_protocol_standard.c (version: 1.75)
[FILE: /srm/main/src/srm_error.h]
--- srm/main/src/srm_error.h:1.3 Thu Feb 20 19:33:27 2003 GMT
+++ srm/main/src/srm_error.h Sun Sep 21 07:24:20 2003 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.3 2003/02/20 20:33:27 derick Exp $ */
+/* $Id: cvstemp,v 1.4 2003/09/21 09:24:20 sniper Exp $ */
/* The contents of this file are subject to the Vulcan Logic Public
* License Version 1.1 (the "License"); you may not use this file
@@ -72,10 +72,10 @@
#define LL_DATA 50
#define LL_STATS 60
-#define ERRMSG_FUNC_NOT_EXIST "This function does not exist"
-#define ERRMSG_FUNC_NOT_IMPLEMENTED "This function is not implemented"
-#define ERRMSG_KEY_EXISTS "There is already data stored with this key"
-#define ERRMSG_KEY_NOT_EXISTS "There is no data stored with this key"
+#define ERRMSG_FUNC_NOT_EXIST "Function '%s' does not exist"
+#define ERRMSG_FUNC_NOT_IMPLEMENTED "Function '%s' is not implemented"
+#define ERRMSG_KEY_EXISTS "There is already data stored with key '%s'"
+#define ERRMSG_KEY_NOT_EXISTS "There is no data stored with key '%s'"
#define ERRMSG_UNKNOWN "There was an error, but we don't know what went wrong"
[FILE: /srm/main/src/srm_functions.c]
--- srm/main/src/srm_functions.c:1.1 Fri Sep 19 15:32:54 2003 GMT
+++ srm/main/src/srm_functions.c Sun Sep 21 07:24:20 2003 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.1 2003/09/19 17:32:54 sniper Exp $ */
+/* $Id: cvstemp,v 1.2 2003/09/21 09:24:20 sniper Exp $ */
/* The contents of this file are subject to the Vulcan Logic Public
* License Version 1.1 (the "License"); you may not use this file
@@ -61,7 +61,7 @@
strlen(cmd));
}
info->count++;
- srm_fmt_message(LL_STATS, "Notice", "Function %s called for the %d time.", cmd, info->count);
+ srm_fmt_message(LL_STATS, "Notice", "Function '%s' called %d time(s).", cmd, info->count);
return SRM_SUCCESS;
}
[FILE: /srm/main/src/srm_protocol_standard.c]
--- srm/main/src/srm_protocol_standard.c:1.74 Fri Sep 19 15:32:55 2003 GMT
+++ srm/main/src/srm_protocol_standard.c Sun Sep 21 07:24:20 2003 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.74 2003/09/19 17:32:55 sniper Exp $ */
+/* $Id: cvstemp,v 1.75 2003/09/21 09:24:20 sniper Exp $ */
/* The contents of this file are subject to the Vulcan Logic Public
* License Version 1.1 (the "License"); you may not use this file
@@ -159,8 +159,12 @@
}
if (status == SRM_FAILED) {
- SRMVALP_SET_STR(ret_val, strdup(ERRMSG_FUNC_NOT_EXIST));
+ char *errmsg = malloc(sizeof(ERRMSG_FUNC_NOT_EXIST) + cmd->value_length + 1);
+
+ sprintf(errmsg, ERRMSG_FUNC_NOT_EXIST, cmd->s_value);
+ SRMVALP_SET_STR(ret_val, strdup(errmsg));
VALP_SET_ERROR(ret_val);
+ free(errmsg);
}
#ifdef SRM_DEBUG
srm_value_dump(ret_val, 1);
Received on Sun Sep 21 11:24:26 2003
This archive was generated by hypermail 2.1.8 : Tue Jan 06 2009 - 12:00:03 CET