| fix(napi): deliver createSubscriber async exception via callback/promise reject CreateSubscriber's Complete callback invokes napi_new_instance which may trigger CommonEventSubscriberConstructor to throw (e.g. ERR_NOTIFICATION_CES_COMMON_PARAM_INVALID 401). The pending exception was never cleared, so ReturnCallbackPromise's napi_call_function/napi_reject_deferred silently failed: the app could neither receive the error via callback/promise nor catch it via try/catch in the async flow. Detect and clear the pending exception after napi_new_instance, extract its code property, and deliver it through ReturnCallbackPromise (callback error arg / promise reject) with a real {code, message}. Also guard against a null constructor before napi_new_instance. Applied to the napi_common_event (commonEventManager) module only; the deprecated common_event module is not maintained. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I1c4905bb61f06e478eaf74f35bd492995d5c5b7b | 2 个月前 |