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

unix,windows: map EFTYPE errno #1836

Merged
merged 1 commit into from May 9, 2018
Merged

unix,windows: map EFTYPE errno #1836

merged 1 commit into from May 9, 2018

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented May 9, 2018

I was able to generate this error in nodejs/node#20588 on FreeBSD. Without it being defined, Node crashed with:

TypeError: errmap.get is not a function or its return value is not iterable
  at Object.uvException (internal/errors.js:521:34)

After defining it, I got a proper exception.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM. That TypeError probably still indicates a node bug though.

#if defined(EFTYPE) && !defined(_WIN32)
# define UV__EFTYPE UV__ERR(EFTYPE)
#else
# define UV__EFTYPE (-79)
Copy link
Member

Choose a reason for hiding this comment

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

Oh wait, this should be -4028, not -79.

@cjihrig
Copy link
Contributor Author

cjihrig commented May 9, 2018

Updated for @bnoordhuis comment. CI: https://ci.nodejs.org/view/libuv/job/libuv-test-commit/832/

UPDATE: CI was good.

Refs: nodejs/node#20588
PR-URL: libuv#1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@cjihrig cjihrig merged commit fe3fbd6 into libuv:v1.x May 9, 2018
@cjihrig cjihrig deleted the eftype branch May 9, 2018 16:07
@joyeecheung
Copy link
Contributor

joyeecheung commented May 9, 2018

@bnoordhuis That error message should be equivalent to errmap.get(ctx.errno) returned undefined which cannot be destructed. Quite confusing at the first glance, yes.

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

Successfully merging this pull request may close these issues.

None yet

3 participants