Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch内通过instanceof判断error类型 #1185

Open
1091214370 opened this issue Apr 24, 2024 · 0 comments
Open

catch内通过instanceof判断error类型 #1185

1091214370 opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@1091214370
Copy link

问题描述

问题的具体描述

复现步骤

子应用内运行以下代码:
try {
const tc =new DataView(new ArrayBuffer(0))
tc.getInt8(0)
} catch(e) {
console.log("🚀 ~ e:", e instanceof RangeError); // 打印为false
}

上传截图

请上传代码截图、控制台、终端等截图以帮助我们了解您的问题。
RangeError.prototype截图如下
image

catch中error的e.proto
image

复现仓库

请提供一个精简的代码仓库,然后上传到自己的 github,以帮助我们复现您的问题。

环境信息

  • micro-app版本:1.0.0-rc.3
  • 主应用前端框架&版本:vue3
  • 子应用前端框架&版本: vue 3
  • 构建工具&版本:vite 5
@1091214370 1091214370 changed the title catch内通过instabceof判断error类型 catch内通过instanceof判断error类型 Apr 24, 2024
@bailicangdu bailicangdu added the bug Something isn't working label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants