Skip to content

tls: add code for ERR_TLS_INVALID_PROTOCOL_METHOD

Add an error code property to invalid secureProtocol method exceptions.

Node errors are supposed to have a .code property, so use the new C++ errors framework.

@joyeecheung Its not clear to me whether this has to be semver-major. I changed the error type from Error (env->ThrowError()) to TypeError, which would be semver-major. The .message should not have changed. If its possible to make this semver-minor by changing the error type, I will.... then introduce a tiny semver-major PR to change the type to TypeError for future releases.

If any kind of change like this to the errors is semver-major by definition, then I won't bother splitting it up.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading