From 13a3fb23df1b2b2811fdc686a195d71cb6f33110 Mon Sep 17 00:00:00 2001 From: cc_ggboy Date: Tue, 5 Sep 2023 02:28:16 +0000 Subject: [PATCH] =?UTF-8?q?account=20arkts=E5=91=8A=E8=AD=A6=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cc_ggboy --- .../reference/apis/js-apis-osAccount.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md index be22f84244..dc98c65871 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md +++ b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md @@ -90,7 +90,9 @@ activateOsAccount(localId: number, callback: AsyncCallback<void>): void } }); } catch (err) { - console.error(`activateOsAccount failed, code is ${err.code}, message is ${err.message}`); + let code = (err as BusinessError).code + let message = (err as BusinessError).message + console.error(`activateOsAccount failed, code is ${code}, message is ${message}`); } ``` @@ -178,7 +180,9 @@ checkMultiOsAccountEnabled(callback: AsyncCallback<boolean>): void } }); } catch (err) { - console.error(`checkMultiOsAccountEnabled failed, code is ${err.code}, message is ${err.message}`); + let code = (err as BusinessError).code + let message = (err as BusinessError).message + console.error(`checkMultiOsAccountEnabled failed, code is ${code}, message is ${message}`); } ``` @@ -214,7 +218,9 @@ checkMultiOsAccountEnabled(): Promise<boolean> console.error(`checkMultiOsAccountEnabled failed, code is ${err.code}, message is ${err.message}`); }); } catch (err) { - console.error(`checkMultiOsAccountEnabled failed, code is ${err.code}, message is ${err.message}`); + let code = (err as BusinessError).code + let message = (err as BusinessError).message + console.error(`checkMultiOsAccountEnabled failed, code is ${code}, message is ${message}`); } ``` -- GitLab