From d7b670c94d72374553be11c2e71d78fede5940a8 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Mon, 2 Oct 2023 02:36:35 +0800 Subject: [PATCH] docs: update api-exception --- docs-source/src/en/config/api-exception.md | 30 +++++++++++++++++++ docs-source/src/zh-cn/config/api-exception.md | 26 ++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/docs-source/src/en/config/api-exception.md b/docs-source/src/en/config/api-exception.md index 414f7ddf..f702e9e6 100644 --- a/docs-source/src/en/config/api-exception.md +++ b/docs-source/src/en/config/api-exception.md @@ -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**\] ::: diff --git a/docs-source/src/zh-cn/config/api-exception.md b/docs-source/src/zh-cn/config/api-exception.md index 27f8797c..e6442166 100644 --- a/docs-source/src/zh-cn/config/api-exception.md +++ b/docs-source/src/zh-cn/config/api-exception.md @@ -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**\] :::