From 791d86750ec0b060083d67a0623f3730280022a1 Mon Sep 17 00:00:00 2001 From: Jozsef Koczo Date: Fri, 6 Jun 2025 11:16:10 +0200 Subject: [PATCH] Multiple catch error handling Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/IC6D1F Signed-off-by: Jozsef Koczo Change-Id: I2d4158cb3a1c2724781bb1ed9cfdc27a37146226 --- .../ANISample/entry/src/main/ets/entryability/EntryAbility.ets | 2 +- .../entry/src/main/ets/entryability/EntryAbility.ets | 2 +- .../entry/src/main/ets/entryability/EntryAbility.ets | 2 +- .../entry/src/main/ets/entryability/EntryAbility.ets | 2 +- .../entry/src/main/ets/entryability/EntryAbility.ets | 2 +- .../entry/src/main/ets/entryability/EntryAbility.ets | 2 +- .../HelloWorld/entry/src/main/ets/entryability/EntryAbility.ets | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ArkTS1.2/ANISample/entry/src/main/ets/entryability/EntryAbility.ets b/code/ArkTS1.2/ANISample/entry/src/main/ets/entryability/EntryAbility.ets index a832d961a2..1e3618f381 100644 --- a/code/ArkTS1.2/ANISample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/ArkTS1.2/ANISample/entry/src/main/ets/entryability/EntryAbility.ets @@ -46,7 +46,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.info(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } diff --git a/code/ArkTS1.2/ComponentSample/entry/src/main/ets/entryability/EntryAbility.ets b/code/ArkTS1.2/ComponentSample/entry/src/main/ets/entryability/EntryAbility.ets index 7cfa743131..cc3692d348 100644 --- a/code/ArkTS1.2/ComponentSample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/ArkTS1.2/ComponentSample/entry/src/main/ets/entryability/EntryAbility.ets @@ -49,7 +49,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.error(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } diff --git a/code/ArkTS1.2/ModuleSample/entry/src/main/ets/entryability/EntryAbility.ets b/code/ArkTS1.2/ModuleSample/entry/src/main/ets/entryability/EntryAbility.ets index b892d18a00..5c794f0fab 100644 --- a/code/ArkTS1.2/ModuleSample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/ArkTS1.2/ModuleSample/entry/src/main/ets/entryability/EntryAbility.ets @@ -24,7 +24,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.info(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } diff --git a/code/ArkTS1.2/ParallelSample/entry/src/main/ets/entryability/EntryAbility.ets b/code/ArkTS1.2/ParallelSample/entry/src/main/ets/entryability/EntryAbility.ets index 943de5a185..ac4c227ff9 100644 --- a/code/ArkTS1.2/ParallelSample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/ArkTS1.2/ParallelSample/entry/src/main/ets/entryability/EntryAbility.ets @@ -47,7 +47,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.error(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } diff --git a/code/ArkTS1.2/ThreadSafeContainersSample/entry/src/main/ets/entryability/EntryAbility.ets b/code/ArkTS1.2/ThreadSafeContainersSample/entry/src/main/ets/entryability/EntryAbility.ets index b892d18a00..5c794f0fab 100644 --- a/code/ArkTS1.2/ThreadSafeContainersSample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/ArkTS1.2/ThreadSafeContainersSample/entry/src/main/ets/entryability/EntryAbility.ets @@ -24,7 +24,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.info(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } diff --git a/code/ArkTS1.2/interopSample/entry/src/main/ets/entryability/EntryAbility.ets b/code/ArkTS1.2/interopSample/entry/src/main/ets/entryability/EntryAbility.ets index 943de5a185..ac4c227ff9 100644 --- a/code/ArkTS1.2/interopSample/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/ArkTS1.2/interopSample/entry/src/main/ets/entryability/EntryAbility.ets @@ -47,7 +47,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.error(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } diff --git a/code/HelloWorld/entry/src/main/ets/entryability/EntryAbility.ets b/code/HelloWorld/entry/src/main/ets/entryability/EntryAbility.ets index 5158b13b6f..d0a2e452db 100644 --- a/code/HelloWorld/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/HelloWorld/entry/src/main/ets/entryability/EntryAbility.ets @@ -24,7 +24,7 @@ class EntryAbility extends UIAbility { } hilog.info(0x0000, 'testTag', 'loadContent ok'); }); - } catch (e: Error) { + } catch (e) { hilog.info(0x0000, 'testTag', 'loadContent catch error:-----------' + e.message); } } -- Gitee