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

fix: add missing stdexcept include to test #1634

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented Feb 7, 2025

‘std::runtime_error’ is defined in header ‘<stdexcept>’.


See failing CI builds on fedora-last-latest (Fedora 40) and fedora-latest (Fedora 41):
e.g. https://ci.nodejs.org/job/node-test-node-addon-api-new/nodes=fedora-latest-x64/9904/console

../except_all.cc: In function ‘void ThrowStdException(const Napi::CallbackInfo&)’:
../except_all.cc:7:14: error: ‘runtime_error’ is not a member of ‘std’
    7 |   throw std::runtime_error(message);
      |              ^~~~~~~~~~~~~
../except_all.cc:2:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; this is probably fixable by adding ‘#include <stdexcept>’
    1 | #include "napi.h"
  +++ |+#include <stdexcept>
    2 | 
make: *** [binding_except_all.target.mk:139: Release/obj.target/binding_except_all/except_all.o] Error 1

‘std::runtime_error’ is defined in header ‘<stdexcept>’.
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.09%. Comparing base (7c3226f) to head (e1f3903).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1634      +/-   ##
==========================================
- Coverage   66.29%   66.09%   -0.21%     
==========================================
  Files           3        3              
  Lines        2154     2144      -10     
  Branches      708      715       +7     
==========================================
- Hits         1428     1417      -11     
  Misses        150      150              
- Partials      576      577       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson mhdawson merged commit 14c1a4f into nodejs:main Feb 7, 2025
54 checks passed
@richardlau richardlau deleted the runtime_error branch February 7, 2025 16:22
@github-actions github-actions bot mentioned this pull request Feb 7, 2025
@Nimesh199398
Copy link

‘std::runtime_error’ is defined in header ‘’.

See failing CI builds on fedora-last-latest (Fedora 40) and fedora-latest (Fedora 41): e.g. https://ci.nodejs.org/job/node-test-node-addon-api-new/nodes=fedora-latest-x64/9904/console

../except_all.cc: In function ‘void ThrowStdException(const Napi::CallbackInfo&)’:
../except_all.cc:7:14: error: ‘runtime_error’ is not a member of ‘std’
    7 |   throw std::runtime_error(message);
      |              ^~~~~~~~~~~~~
../except_all.cc:2:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; this is probably fixable by adding ‘#include <stdexcept>’
    1 | #include "napi.h"
  +++ |+#include <stdexcept>
    2 | 
make: *** [binding_except_all.target.mk:139: Release/obj.target/binding_except_all/except_all.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

5 participants