This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
DNS — Throw meaningful error(s). #7070
Comments
https://github.com/joyent/node/blob/master/lib/dns.js#L185-L191 asserts argument[1] to be string or it will be evaluated as function. |
This was referenced Feb 7, 2014
Wupps, GitHub doesn't do well with a retroactively cleaned-up history for PRs it seems. |
indutny
pushed a commit
that referenced
this issue
Feb 7, 2014
Don't use argument as callback if it's not a valid callback function. Throw a valid exception instead explaining the issue. Adds to #7070 ("DNS — Throw meaningful error(s)").
This looks like a minefield.. hopefully none ever will see it again 👶 |
indutny
pushed a commit
that referenced
this issue
Feb 9, 2014
Don't use argument as callback if it's not a valid callback function. Throw a valid exception instead explaining the issue. Adds to #7070 ("DNS — Throw meaningful error(s)").
indutny
pushed a commit
that referenced
this issue
Feb 9, 2014
Mitigate C++-land assertion error, add test accordingly. Fix #7070
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
(1) Assertion:
dns.resolveNs([])
(2) Callbacks:
dns.resolve("test.com", [], new Function)
should raise an error if argument[1] isn't of type function. (instead of crashing against the wall)The text was updated successfully, but these errors were encountered: