mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 01:35:17 +08:00
Update api-exception documentation
This commit is contained in:
@@ -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".
|
||||
|
@@ -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 进程“死掉”。
|
||||
|
Reference in New Issue
Block a user