-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Clean up error codes in napi somewhat #13179
Conversation
❌ @Jarred-Sumner, your commit 8ec6a1c has 8 failures in test/cli/watch/watch.test.ts - timeout on 🪟 x64-baselinetest/cli/watch/watch.test.ts - timeout on 🪟 x64test/cli/hot/watch.test.ts - 1 failing on 🪟 x64-baselinetest/cli/hot/watch.test.ts - 1 failing on 🪟 x64test/js/bun/jsc/bun-jsc.test.ts - timeout on 🪟 x64-baselinetest/js/bun/jsc/bun-jsc.test.ts - timeout on 🪟 x64test/cli/hot/hot.test.ts - 3 failing on 🪟 x64-baselinetest/cli/hot/hot.test.ts - 3 failing on 🪟 x64test/cli/install/registry/bun-install-registry.test.ts - 3 failing on 🪟 x64-baselinetest/cli/install/registry/bun-install-registry.test.ts - 3 failing on 🪟 x64test/js/web/streams/streams.test.js - 1 failing on 🍎 14 aarch64test/js/bun/spawn/spawn-streaming-stdin.test.ts - 1 failing on 🪟 x64-baselinetest/js/bun/spawn/spawn-streaming-stdin.test.ts - 1 failing on 🪟 x64test/regression/issue/07500/07500.test.ts - 1 failing on 🪟 x64-baseline |
@Jarred-Sumner, % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
13 372M 13 50.4M 0 0 40.5M 0 0:00:09 0:00:01 0:00:08 50.6M
34 372M 34 127M 0 0 56.9M 0 0:00:06 0:00:02 0:00:04 64.0M
53 372M 53 199M 0 0 61.6M 0 0:00:06 0:00:03 0:00:03 66.7M
72 372M 72 270M 0 0 63.6M 0 0:00:05 0:00:04 0:00:01 67.5M
92 372M 92 346M 0 0 66.0M 0 0:00:05 0:00:05 --:--:-- 69.2M
100 372M 100 372M 0 0 66.8M 0 0:00:05 0:00:05 --:--:-- 74.4M Commit: 8ec6a1c |
src/bun.js/bindings/napi.cpp
Outdated
if (catchScope.exception()) { | ||
catchScope.clearException(); | ||
return {}; | ||
} | ||
} | ||
|
||
if (catchScope.exception()) { | ||
catchScope.clearException(); | ||
return {}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. This check should be deleted because it looks like the one above would catch any exceptions
src/bun.js/bindings/napi.cpp
Outdated
} | ||
*result = reinterpret_cast<napi_value>(error); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*result = toNapi(err);
What does this PR do?
Clean up error codes in napi somewhat
How did you verify your code works?