You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/11/12 10:01:32 UTC

svn commit: r594056 - in /webservices/axis2/trunk/c/util: include/axutil_error.h src/error.c

Author: dinesh
Date: Mon Nov 12 01:01:29 2007
New Revision: 594056

URL: http://svn.apache.org/viewvc?rev=594056&view=rev
Log:
defined distinct error blocks in module and user space

Modified:
    webservices/axis2/trunk/c/util/include/axutil_error.h
    webservices/axis2/trunk/c/util/src/error.c

Modified: webservices/axis2/trunk/c/util/include/axutil_error.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_error.h?rev=594056&r1=594055&r2=594056&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_error.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_error.h Mon Nov 12 01:01:29 2007
@@ -27,6 +27,19 @@
 {
 #endif
 
+
+#define AXUTIL_ERROR_MESSAGE_BLOCK_SIZE 512
+#define AXUTIL_ERROR_LAST AXUTIL_ERROR_MESSAGE_BLOCK_SIZE
+#define NEETHI_ERROR_CODES_START AXIS2_ERROR_LAST
+#define RAMPART_ERROR_CODES_START (NEETHI_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
+#define SANDESHA2_ERROR_CODES_START (RAMPART_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
+#define SAVAN_ERROR_CODES_START (SANDESHA2_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
+#define USER_ERROR_CODES_START (SAVAN_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
+
+/* AXUTIL_ERROR_MAX define the maximum size of the error array */
+#define AXUTIL_ERROR_MAX (USER_ERROR_CODES_START+AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
+
+
     /**
      * \brief Axis2 status codes
      *

Modified: webservices/axis2/trunk/c/util/src/error.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/error.c?rev=594056&r1=594055&r2=594056&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/error.c (original)
+++ webservices/axis2/trunk/c/util/src/error.c Mon Nov 12 01:01:29 2007
@@ -20,17 +20,7 @@
 #include <string.h>
 #include "axutil_error_default.h"
 
-#define AXUTIL_ERROR_MESSAGE_BLOCK_SIZE 512
-#define AXUTIL_ERROR_LAST AXUTIL_ERROR_MESSAGE_BLOCK_SIZE
-#define NEETHI_ERROR_CODES_START AXIS2_ERROR_LAST
-#define RAMPART_ERROR_CODES_START (NEETHI_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
-#define SANDESHA2_ERROR_CODES_START (RAMPART_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
-#define SAVAN_ERROR_CODES_START (SANDESHA2_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
-#define USER_ERROR_CODES_START (SAVAN_ERROR_CODES_START + AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
-
-/* AXUTIL_ERROR_MAX_LAST define the maximum size of the error array */
-#define AXUTIL_ERROR_MAX_LAST (USER_ERROR_CODES_START+AXUTIL_ERROR_MESSAGE_BLOCK_SIZE)
-#define AXIS2_ERROR_MESSAGE_ARRAY_SIZE AXUTIL_ERROR_MAX_LAST
+#define AXIS2_ERROR_MESSAGE_ARRAY_SIZE AXUTIL_ERROR_MAX
 
 
 /**
@@ -43,15 +33,12 @@
  *
  * In writing a module following steps must be followed in extending Axis2/C
  * errors
- * 1. Declare the start of error messages for the new module.
-      For example in sandesha2 module we have
-      #define SANDESHA2_ERROR_CODES_START (AXIS2_ERROR_LAST + 1000)
-      Above line indicates that the new modules error messages start from 
-      1000 messages after the axis2 last error message.
-   2. New module can use up to 1000 messages for its errors.
-   3. In axis2c documentation an entry about new modules error range must
-      be inserted so that another new module can know about the already
-      occupied spaces. 
+ * 1. Declare and register the start of error messages for the new
+ *    module. 
+ * 2. New module can use up to 1000 messages for its errors.
+ * 3. In axis2c documentation an entry about new modules error range must
+ *    be inserted so that another new module can know about the already
+ *    occupied spaces. 
  */
 
 AXIS2_EXPORT const axis2_char_t 
@@ -589,7 +576,7 @@
     if (error)
     {
         if (error->error_number > AXIS2_ERROR_NONE &&
-            error->error_number < AXIS2_ERROR_LAST) /* TODO; This needs to be 
+            error->error_number < AXIS2_ERROR_MAX) /* TODO; This needs to be 
             fixed to include module defined and user defined errors */
             message = axutil_error_messages[error->error_number];
         else



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org