Skip to content

src: align FFI error handling with Node.js source#62858

Open
addaleax wants to merge 3 commits intonodejs:mainfrom
addaleax:ffi-error-handling
Open

src: align FFI error handling with Node.js source#62858
addaleax wants to merge 3 commits intonodejs:mainfrom
addaleax:ffi-error-handling

Conversation

@addaleax
Copy link
Copy Markdown
Member

Align the FFI error handling logic with the rest of the Node.js source.

Refs: https://github.com/nodejs/node/blob/main/src/README.md#exception-handling

Align the FFI error handling logic with the rest of the
Node.js source.

Refs: https://github.com/nodejs/node/blob/main/src/README.md#exception-handling
Signed-off-by: Anna Henningsen <anna@addaleax.net>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 20, 2026
@addaleax addaleax added the ffi Issues and PRs related to experimental Foreign Function Interface support. label Apr 20, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 77.16535% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.61%. Comparing base (e02087c) to head (b289c55).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/ffi/data.cc 77.66% 8 Missing and 15 partials ⚠️
src/ffi/types.cc 73.25% 19 Missing and 4 partials ⚠️
src/node_ffi.cc 81.53% 2 Missing and 10 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62858      +/-   ##
==========================================
- Coverage   89.64%   89.61%   -0.03%     
==========================================
  Files         706      706              
  Lines      219137   219115      -22     
  Branches    41999    41977      -22     
==========================================
- Hits       196453   196369      -84     
- Misses      14574    14647      +73     
+ Partials     8110     8099      -11     
Files with missing lines Coverage Δ
src/node_ffi.h 72.72% <ø> (ø)
src/node_ffi.cc 68.80% <81.53%> (-0.25%) ⬇️
src/ffi/data.cc 73.79% <77.66%> (+0.50%) ⬆️
src/ffi/types.cc 60.15% <73.25%> (+0.53%) ⬆️

... and 39 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@addaleax addaleax requested a review from ShogunPanda April 20, 2026 21:50
@addaleax addaleax added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 21, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 21, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Comment thread src/ffi/data.cc Outdated
@addaleax addaleax requested a review from daeyeon April 21, 2026 13:51
@daeyeon daeyeon added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Apr 21, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 21, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. ffi Issues and PRs related to experimental Foreign Function Interface support. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants