首页
开源
资讯
活动
开源许可证
软件工程云服务
软件代码质量检测云服务
持续集成与部署云服务
社区个性化内容推荐服务
贡献审阅人推荐服务
群体化学习服务
重睛鸟代码扫描工具
登录
注册
代码拉取完成,页面将自动刷新
Watch
57
Star
30
Fork
163
OpenHarmony-SIG
/
arkcompiler_runtime_core
Fork 仓库
加载中
取消
确认
代码
Issues
17
Pull Requests
132
Wiki
30
统计
更新失败,请稍后重试!
Issues
/
详情
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
[ArkTS] Throw original exception in class initializer
待办的
#I89NZD
任务
LiYue
创建于
2023-10-20 16:12
**【任务描述】** test code ``` let result: String = "" class A { public static fld: String = new Int(1/0).toString() // get ArithmeticException } function getVal(): String { result = result + "1" return "abc" } function main(): int { let s: String = "" try { s = ((A.fld)) = getVal() } catch (e: ArithmeticException) { if (result == "1" && s == "") { return 0 } } return 1 } ``` We have ExceptionInInitializerError support, but for some reason the test expects ArithmeticException instead of ExceptionInInitializerError.
**【任务描述】** test code ``` let result: String = "" class A { public static fld: String = new Int(1/0).toString() // get ArithmeticException } function getVal(): String { result = result + "1" return "abc" } function main(): int { let s: String = "" try { s = ((A.fld)) = getVal() } catch (e: ArithmeticException) { if (result == "1" && s == "") { return 0 } } return 1 } ``` We have ExceptionInInitializerError support, but for some reason the test expects ArithmeticException instead of ExceptionInInitializerError.
评论 (
0
)
LiYue
创建了
任务
LiYue
修改了
标题
原值
[ArkTS]
新值
[ArkTS]
Throw original exception in class initializer
LiYue
修改了
描述
原值
**【任务描述】**
test code
```
let result: String = ""
class A {
public static fld: String = new Int(1/0).toString() // get ArithmeticException
}
function getVal(): String {
result = result + "1"
return "abc"
}
function main(): int {
let s: String = ""
try {
s = ((A.fld)) = getVal()
} catch (e: ArithmeticException) {
if (result == "1" && s == "") {
return 0
}
}
return 1
}
```
We have ExceptionInInitializerError support, but for some reason the test expects ArithmeticException instead of ExceptionInInitializerError.
新值
**【任务描述】**
test code
```
let result: String = ""
class A {
public static fld: String = new Int(1/0).toString() // get ArithmeticException
}
function getVal(): String {
result = result + "1"
return "abc"
}
function main(): int {
let s: String = ""
try {
s = ((A.fld)) = getVal()
} catch (e: ArithmeticException) {
if (result == "1" && s == "") {
return 0
}
}
return 1
}
```
We have ExceptionInInitializerError support, but for some reason the test expects ArithmeticException instead of ExceptionInInitializerError.
LiYue
关联了
OpenHarmony-SIG/arkcompiler_runtime_core Pull Request !2081
展开全部操作日志
折叠全部操作日志
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已拒绝
负责人
未设置
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (2)
标签 (13)
master
add-license
arkts-spec-release-2023-10-26
sts-spec-release-2023-10-13
sts-spec-release-2023-10-10
sts-spec-release-2023-09-26
sts-spec-release-2023-06-16
sts-spec-release-2023-05-22
sts-spec-release-2023-05-05
sts-spec-release-2023-04-21
sts-spec-release-2023-04-07
sts-spec-release-2023-03-13
sts-spec-release-2023-02-17
sts-spec-release-2023-02-10
sts-spec-release
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)