docs: update api-exception

This commit is contained in:
2023-10-02 02:36:35 +08:00
parent 3118b3a5e6
commit d7b670c94d
2 changed files with 56 additions and 0 deletions

View File

@@ -650,6 +650,36 @@ After troubleshooting your own code problems, please provide detailed logs for f
::: danger loggerE
Failed to got Host Resources
:::
**Abnormal**
Failed to obtain the Host App's original Resources instance object when using `replaceTo { ... }` or `replaceToModuleResource { ... }` when finding Resources.
> The following example
```kotlin
conditions {
name = "test"
string()
}
replaceTo { "${it}_some_text" }
```
**Solution**
Under normal circumstances, this error will basically not occur.
If this error occurs, it may be a problem with the currently used Hook Framework.
After troubleshooting your own code problems, please provide detailed logs for feedback.
###### exception
::: danger loggerE
Resources Hook condition name/type cannot be empty \[**TAG**\]
:::

View File

@@ -630,6 +630,32 @@ Invoke original Member \[**MEMBER**\] failed
::: danger loggerE
Failed to got Host Resources
:::
**异常原因**
在查找 Resources 时使用 `replaceTo { ... }``replaceToModuleResource { ... }` 时未能获取到宿主的原始 Resources 实例对象。
> 示例如下
```kotlin
conditions {
name = "test"
string()
}
replaceTo { "${it}_some_text" }
```
**解决方案**
一般情况下,此错误基本上不会发生,若发生此错误,可能为当前使用的 Hook Framework 问题,排除自身代码的问题后,请携带详细日志进行反馈。
###### exception
::: danger loggerE
Resources Hook condition name/type cannot be empty \[**TAG**\]
:::