From 6db49815c98640a7397f674efa02ea8793176654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B5=A9=E7=A8=8B?= <798994511@qq.com> Date: Wed, 2 Apr 2025 16:46:32 +0800 Subject: [PATCH] 1 --- entry/src/main/ets/entryability/EntryAbility.ets | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 67aae59..09ef9e4 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -75,7 +75,8 @@ export default class EntryAbility extends UIAbility { }); windowStage.loadContent('pages/Index', (err, data) => { if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', + JSON.stringify(err.message) ?? ''); return; } this.setWindowClass(windowStage); @@ -85,7 +86,7 @@ export default class EntryAbility extends UIAbility { windowClass.setWindowLayoutFullScreen(isLayoutFullScreen).then(() => { console.info('Succeeded in setting the window layout to full-screen mode.'); }).catch((err: BusinessError) => { - console.error('Failed to set the window layout to full-screen mode. Cause:' + JSON.stringify(err)); + console.error('Failed to set the window layout to full-screen mode. Cause:' + JSON.stringify(err.message)); }); }); } -- Gitee