From 7177ef235e826aa2ea0e49bb5f577dfb4b809ae9 Mon Sep 17 00:00:00 2001 From: fangxiao Date: Mon, 18 Aug 2025 17:02:01 +0800 Subject: [PATCH] Fix the compilation issue of catch Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICTJB6 Change-Id: I0150c31c0116e3a35b8d3bb1e83803db3c74e44c Signed-off-by: fangxiao --- ets2panda/parser/ETSparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ets2panda/parser/ETSparser.cpp b/ets2panda/parser/ETSparser.cpp index 940cfa83d9..19d3883aca 100644 --- a/ets2panda/parser/ETSparser.cpp +++ b/ets2panda/parser/ETSparser.cpp @@ -1922,7 +1922,7 @@ ir::Expression *ETSParser::ParseCatchParam() void ETSParser::ParseCatchParamTypeAnnotation([[maybe_unused]] ir::AnnotatedExpression *param) { if (Lexer()->TryEatTokenType(lexer::TokenType::PUNCTUATOR_COLON)) { - LogError(diagnostic::MULTI_CATCH_DEPRECATED); + LogUnexpectedToken(Lexer()->GetToken()); TypeAnnotationParsingOptions options = TypeAnnotationParsingOptions::REPORT_ERROR; if (auto *typeAnnotation = ParseTypeAnnotation(&options); typeAnnotation != nullptr) { ES2PANDA_ASSERT(param != nullptr); -- Gitee