-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
crypto: use macro map for NodeCryptoError #37758
crypto: use macro map for NodeCryptoError #37758
Conversation
src/crypto/crypto_util.h
Outdated
} | ||
errors_.emplace_back(SPrintF(error_string, | ||
std::forward<Args>(args)...)); | ||
} | ||
#undef NODE_CRYPTO_ERROR_CODES_MAP |
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.
Having this available outside of the header might be useful at some point 🤷♀️
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.
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.
No, not right now, although I guess if we add more error codes to CryptoErrorStore::Insert()
then it might make sense to move the part that generates error_string
/that doesn’t use args
back into a .cc
file (because right now every call to CryptoErrorStore::Insert()
potentially creates a new copy of the function).
PR-URL: #37758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Landed in 971e009 |
PR-URL: #37758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
No description provided.