You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by GitBox <gi...@apache.org> on 2022/02/21 11:50:28 UTC

[GitHub] [celix] xuzhenbao opened a new pull request #400: Improved error codes for remote services

xuzhenbao opened a new pull request #400:
URL: https://github.com/apache/celix/pull/400


   #396 #394
   This PR improves the error code for the remote service, and fixes some memory leak issues  related remote service.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] pnoltes commented on a change in pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
pnoltes commented on a change in pull request #400:
URL: https://github.com/apache/celix/pull/400#discussion_r814586098



##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0
+
+/*!
+ * The facility of celix default error code
+ *
+ */
+#define CELIX_FACILITY_NULL 1

Review comment:
       I like the rename to `CELIX_FACILITY_CERRNO`, that makes it more clear for me. 
   
   I am still not sure about the `CELIX_FACILITY_NULL` name; Could this be renamed to `CELIX_FACILITY_FRAMEWORK`.
   
   Than we have `CELIX_FACILITY_CERRNO` to communicate errno as-is and `CELIX_FACILITY_FRAMEWORK` for Celix framework errors. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] pnoltes commented on a change in pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
pnoltes commented on a change in pull request #400:
URL: https://github.com/apache/celix/pull/400#discussion_r814577673



##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0

Review comment:
       Good point




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] codecov-commenter edited a comment on pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #400:
URL: https://github.com/apache/celix/pull/400#issuecomment-1050668877


   # [Codecov](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#400](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a7472d1) into [master](https://codecov.io/gh/apache/celix/commit/ca74a957d415cea0120a549bbf75752a0bff44fd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ca74a95) will **increase** coverage by `0.08%`.
   > The diff coverage is `93.22%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/celix/pull/400/graphs/tree.svg?width=650&height=150&src=pr&token=JdsiThga8P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #400      +/-   ##
   ==========================================
   + Coverage   73.01%   73.09%   +0.08%     
   ==========================================
     Files         205      205              
     Lines       31322    31342      +20     
   ==========================================
   + Hits        22869    22911      +42     
   + Misses       8453     8431      -22     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...te\_service\_admin\_dfi/src/import\_registration\_dfi.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9pbXBvcnRfcmVnaXN0cmF0aW9uX2RmaS5j) | `74.77% <88.23%> (+0.62%)` | :arrow_up: |
   | [libs/dfi/src/json\_rpc.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9kZmkvc3JjL2pzb25fcnBjLmM=) | `86.72% <93.93%> (+2.04%)` | :arrow_up: |
   | [...te\_service\_admin\_dfi/src/export\_registration\_dfi.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9leHBvcnRfcmVnaXN0cmF0aW9uX2RmaS5j) | `80.87% <100.00%> (+0.10%)` | :arrow_up: |
   | [...e\_service\_admin\_dfi/src/remote\_service\_admin\_dfi.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9yZW1vdGVfc2VydmljZV9hZG1pbl9kZmkuYw==) | `85.04% <100.00%> (+1.61%)` | :arrow_up: |
   | [libs/utils/src/hash\_map.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy91dGlscy9zcmMvaGFzaF9tYXAuYw==) | `93.25% <0.00%> (-0.29%)` | :arrow_down: |
   | [...\_services/remote\_service\_admin\_dfi/src/dfi\_utils.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9kZmlfdXRpbHMuYw==) | `88.52% <0.00%> (+21.31%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [ca74a95...a7472d1](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] pnoltes merged pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
pnoltes merged pull request #400:
URL: https://github.com/apache/celix/pull/400


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] codecov-commenter commented on pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #400:
URL: https://github.com/apache/celix/pull/400#issuecomment-1050668877


   # [Codecov](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#400](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b8a8863) into [master](https://codecov.io/gh/apache/celix/commit/ca74a957d415cea0120a549bbf75752a0bff44fd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ca74a95) will **increase** coverage by `0.08%`.
   > The diff coverage is `93.22%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/celix/pull/400/graphs/tree.svg?width=650&height=150&src=pr&token=JdsiThga8P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #400      +/-   ##
   ==========================================
   + Coverage   73.01%   73.09%   +0.08%     
   ==========================================
     Files         205      205              
     Lines       31322    31342      +20     
   ==========================================
   + Hits        22869    22910      +41     
   + Misses       8453     8432      -21     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...te\_service\_admin\_dfi/src/import\_registration\_dfi.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9pbXBvcnRfcmVnaXN0cmF0aW9uX2RmaS5j) | `74.77% <88.23%> (+0.62%)` | :arrow_up: |
   | [libs/dfi/src/json\_rpc.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9kZmkvc3JjL2pzb25fcnBjLmM=) | `86.72% <93.93%> (+2.04%)` | :arrow_up: |
   | [...te\_service\_admin\_dfi/src/export\_registration\_dfi.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9leHBvcnRfcmVnaXN0cmF0aW9uX2RmaS5j) | `80.87% <100.00%> (+0.10%)` | :arrow_up: |
   | [...e\_service\_admin\_dfi/src/remote\_service\_admin\_dfi.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9yZW1vdGVfc2VydmljZV9hZG1pbl9kZmkuYw==) | `85.04% <100.00%> (+1.61%)` | :arrow_up: |
   | [...sub/pubsub\_admin\_tcp/src/pubsub\_tcp\_topic\_sender.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3RjcC9zcmMvcHVic3ViX3RjcF90b3BpY19zZW5kZXIuYw==) | `84.88% <0.00%> (-0.89%)` | :arrow_down: |
   | [...\_services/remote\_service\_admin\_dfi/src/dfi\_utils.c](https://codecov.io/gh/apache/celix/pull/400/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9yZW1vdGVfc2VydmljZXMvcmVtb3RlX3NlcnZpY2VfYWRtaW5fZGZpL3NyYy9kZmlfdXRpbHMuYw==) | `88.52% <0.00%> (+21.31%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [ca74a95...b8a8863](https://codecov.io/gh/apache/celix/pull/400?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] xuzhenbao commented on a change in pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
xuzhenbao commented on a change in pull request #400:
URL: https://github.com/apache/celix/pull/400#discussion_r814713313



##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0
+
+/*!
+ * The facility of celix default error code
+ *
+ */
+#define CELIX_FACILITY_NULL 1

Review comment:
       Thank you very much for your advice,I like  to  rename `CELIX_FACILITY_NULL` to `CELIX_FACILITY_FRAMEWORK`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] xuzhenbao commented on a change in pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
xuzhenbao commented on a change in pull request #400:
URL: https://github.com/apache/celix/pull/400#discussion_r812540421



##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0
+
+/*!
+ * The facility of celix default error code
+ *
+ */
+#define CELIX_FACILITY_NULL 1

Review comment:
       In the case of the existing error code value unchanged, I would like to make a distinction between celix default error code and C errno by using `CELIX_FACILITY_NULL` and `CELIX_FACILITY_SYSTEM`(To avoid ambiguity,I will rename `CELIX_FACILITY_SYSTEM` to `CELIX_FACILITY_CERRNO`). And we can replace existing error codes like following:
   ~~~C
   #define CELIX_FACILITY_CERRNO 0
   #define CELIX_FACILITY_NULL 1
   const celix_status_t  CELIX_FRAMEWORK_EXCEPTION = CELIX_ERROR_MAKE(CELIX_FACILITY_NULL,   4471);//=70007
   const celix_status_t  CELIX_FILE_IO_EXCEPTION= CELIX_ERROR_MAKE(CELIX_FACILITY_NULL,   4472);//=70008
   
   const celix_status_t  CELIX_ENOMEM = CELIX_ERROR_MAKE(CELIX_FACILITY_CERRNO,   ENOMEM);//=ENOMEM
   const celix_status_t  CELIX_EAGAIN = CELIX_ERROR_MAKE(CELIX_FACILITY_CERRNO,   EAGAIN);//=EAGAIN
   ~~~
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] pnoltes commented on a change in pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
pnoltes commented on a change in pull request #400:
URL: https://github.com/apache/celix/pull/400#discussion_r812344354



##########
File path: libs/utils/include/celix_errno.h
##########
@@ -99,6 +150,10 @@ const char* celix_strerror(celix_status_t status);
 #define CELIX_FRAMEWORK_EXCEPTION (CELIX_START_ERROR + 7)

Review comment:
       I think the error could be replaced with something like:
   
   ```
   const celix_status_t  CELIX_FRAMEWORK_EXCEPTION = CELIX_ERROR_MAKE(CELIX_FACILITY_SYSTEM,   7);
   const celix_status_t  CELIX_FILE_IO_EXCEPTION = CELIX_ERROR_MAKE(CELIX_FACILITY_SYSTEM,             9);
   //etc
   ```
   
   That we make use of the new error code approach and also create an example.

##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0

Review comment:
       De we want a facility `0` code or always ensure a not `0` to more easily see of its a valid error code.
   
   

##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0
+
+/*!
+ * The facility of celix default error code
+ *
+ */
+#define CELIX_FACILITY_NULL 1

Review comment:
       I am not sure why a `CELIX_FACILITY_NULL` is needed, is the `CELIX_FACILITY_SYSTEM` not a more  logical default facility error value? 

##########
File path: libs/utils/include/celix_errno.h
##########
@@ -99,6 +150,10 @@ const char* celix_strerror(celix_status_t status);
 #define CELIX_FRAMEWORK_EXCEPTION (CELIX_START_ERROR + 7)
 #define CELIX_FILE_IO_EXCEPTION (CELIX_START_ERROR + 8)
 #define CELIX_SERVICE_EXCEPTION (CELIX_START_ERROR + 9)
+/*!
+ * Exception indicating a problem with a interceptor
+ */
+#define CELIX_INTERCEPTOR_EXCEPTION (CELIX_START_ERROR + 10)
 
 #define CELIX_ENOMEM ENOMEM

Review comment:
       Maybe also give CELIX_ENOMEM an own value and directly couple it to the C ENOMEM




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] xuzhenbao commented on a change in pull request #400: Improved error codes for remote services

Posted by GitBox <gi...@apache.org>.
xuzhenbao commented on a change in pull request #400:
URL: https://github.com/apache/celix/pull/400#discussion_r812597292



##########
File path: libs/utils/include/celix_errno.h
##########
@@ -61,6 +73,44 @@ typedef int celix_status_t;
  */
 const char* celix_strerror(celix_status_t status);
 
+/*!
+ * Customer error code mask
+ *
+ */
+#define CELIX_CUSTOMER_ERR_MASK 0x20000000
+
+/*!
+ * The facility of system error code,
+ * \note Error code 0 indicates success,it is not system error code.
+ */
+#define CELIX_FACILITY_SYSTEM 0

Review comment:
       I whould like facility 0  indicate C errno. Because some interfaces has treat C errno as their return value.   for example `celixThreadMutex_create,celixThreadMutex_lock`,etc.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org