xuzhenbao commented on issue #396:
URL: https://github.com/apache/celix/issues/396#issuecomment-1034980501


   @pnoltes Thanks for your reply!
   After I learned  HRESULT,I would like that celix error code has the 
following internal structure.
   |31-30bit|29bit|28-27bit|26-16bit|15-0bit|
   |---------|------|----------|---------|--------|
   |R           |C      |R             |Facility  |Code   |
   
   **C (1bit):** Customer. If set, indicates that the error code is 
customer-defined. If clear, indicates that the error code is celix-defines
   **R :** Reserved. It should be set to 0.
   **Facility (11 bits):** An indicator of the source of the error. we can 
define it in celix_errno.h
   The following table lists the currently defined facility codes:
   |Value|Meaning|
   |------|----------|
   |CELIX_FACILITY_SYSTEM(0)|System error code. eg:CELIX_ENOMEM|
   |CELIX_FACILITY_NULL(1)|celix default error code. eg:CELIX_BUNDLE_EXCEPTION, 
CELIX_INVALID_BUNDLE_CONTEXT, etc. It is compatible with existing error codes.|
   |CELIX_FACILITY_RPC(2)  |The source of the error code is an RPC subsystem.|
   |CELIX_FACILITY_HTTP(3)|The source of the error code is HTTP supporter.|
   
   **Code(16 bits):**  The remainder of the error code.
   
   If you think it's possible,  I will pick this up in mine pull request.
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to