From 6e1a149b972fdc2f8ed18f14ea90f2faf6f71965 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Tue, 29 Nov 2022 01:35:36 +0800 Subject: [PATCH] Update api-exception documentation --- docs-source/src/en/config/api-exception.md | 24 +++++++++++++++++-- docs-source/src/zh-cn/config/api-exception.md | 16 +++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs-source/src/en/config/api-exception.md b/docs-source/src/en/config/api-exception.md index 4b41f729..7a1ec695 100644 --- a/docs-source/src/en/config/api-exception.md +++ b/docs-source/src/en/config/api-exception.md @@ -742,7 +742,7 @@ You cannot inject module resources into yourself Use `injectModuleAppResources` in the (Xposed) Host environment (the Module App's own Xposed Environment) to inject the Module App's own resources into itself. -**solution** +**Solution** Since the Module App itself can also be Hooked by itself, you cannot inject yourself into the Module App itself (you cannot recurse its own resources). @@ -869,12 +869,32 @@ You cannot register Activity Proxy into yourself Use `registerModuleAppActivities` to inject the Module App's own `Activity` into itself in the (Xposed) Host environment (the Module App's own Xposed Environment). -**solution** +**Solution** Since the Module App itself can also be Hooked by itself, you cannot inject yourself into the Module App itself (you cannot recurse its own resources). If you must obtain the resources of the Module App itself, please use it directly without any other operations. +###### exception + +::: danger loggerE + +An exception occurred during AppLifecycle event + +::: + +**Abnormal** + +Use `onAppLifecycle` in the (Xposed) Host environment to listen for exceptions during the Host App's lifecycle. + +**Solution** + +This exception is thrown in `onAppLifecycle`. + +Since you set the parameter `isOnFailureThrowToApp = false`, the exception is not thrown in the Host App but printed in the (Xposed) Host environment. + +This is not an API exception, please be careful check your own code for problems. + ## Blocking Exceptions > These exceptions will directly cause the app to stop running (FC), at the same time print `E` level logs on the console, and also cause the Hook process to "die". diff --git a/docs-source/src/zh-cn/config/api-exception.md b/docs-source/src/zh-cn/config/api-exception.md index 79aa33ad..8a1bae12 100644 --- a/docs-source/src/zh-cn/config/api-exception.md +++ b/docs-source/src/zh-cn/config/api-exception.md @@ -836,6 +836,22 @@ You cannot register Activity Proxy into yourself 由于模块自身也可以被自身 Hook,但你并不可以在模块自身注入自己 (不能递归自身的资源),若你一定要获取模块自身的资源,请直接使用即可,无需任何其它操作。 +###### exception + +::: danger loggerE + +An exception occurred during AppLifecycle event + +::: + +**异常原因** + +在 (Xposed) 宿主环境中使用 `onAppLifecycle` 监听宿主生命周期期间发生异常。 + +**解决方案** + +此异常为 `onAppLifecycle` 中抛出,由于你设置了参数 `isOnFailureThrowToApp = false`,异常没有在宿主中被抛出而是在 (Xposed) 宿主环境中进行打印,这不属于 API 的异常,请仔细检查自身代码的问题。 + ## 阻断异常 > 这些异常会直接导致 APP 停止运行(FC),同时会在控制台打印 `E` 级别的日志,还会造成 Hook 进程“死掉”。