From b1b1e2c8be80b8093680fa81005ebb4ecad941c9 Mon Sep 17 00:00:00 2001 From: wuchengwen Date: Tue, 29 Apr 2025 15:03:30 +0800 Subject: [PATCH] fix:error message Signed-off-by: wuchengwen --- .../js/napi/inputmethodclient/js_utils.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frameworks/js/napi/inputmethodclient/js_utils.cpp b/frameworks/js/napi/inputmethodclient/js_utils.cpp index d8446aa23..1546d8f39 100644 --- a/frameworks/js/napi/inputmethodclient/js_utils.cpp +++ b/frameworks/js/napi/inputmethodclient/js_utils.cpp @@ -96,13 +96,17 @@ const std::map JsUtils::ERROR_CODE_CONVERT_MESSAGE_MAP = { { EXCEPTION_PARAMCHECK, "the parameters check fails." }, { EXCEPTION_UNSUPPORTED, "capability not supported." }, { EXCEPTION_PACKAGEMANAGER, "bundle manager error." }, - { EXCEPTION_IMENGINE, "input method engine error." }, - { EXCEPTION_IMCLIENT, "input method client error." }, - { EXCEPTION_IME, "not an input method." }, + { EXCEPTION_IMENGINE, "input method engine error. Possible causes: 1.input method panel not created.\ + 2.the input method application does not subscribe to related events." }, + { EXCEPTION_IMCLIENT, "input method client error. Possible causes: 1.the edit box is not focused.\ + 2.no edit box is bound to current input method application." }, + { EXCEPTION_IME, "not an input method application." }, { EXCEPTION_CONFPERSIST, "configuration persistence error." }, - { EXCEPTION_CONTROLLER, "input method controller error." }, - { EXCEPTION_SETTINGS, "input method setter error." }, - { EXCEPTION_IMMS, "input method manager service error." }, + { EXCEPTION_CONTROLLER, "input method controller error.\ + Possible cause: create InputmethodController object failed." }, + { EXCEPTION_SETTINGS, "input method setter error. Possible cause: create InputmethodSetting object failed." }, + { EXCEPTION_IMMS, "input method manager service error. Possible cause: a system error, such as null pointer,\ + IPC exception." }, { EXCEPTION_DETACHED, "input method client detached." }, { EXCEPTION_DEFAULTIME, "not the preconfigured default input method." }, { EXCEPTION_TEXT_PREVIEW_NOT_SUPPORTED, "text preview not supported." }, -- Gitee