Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit efe1781

Browse files
tjfontaineJulien Gilli
authored andcommitted
crypto: don't use transitionary ThrowException
Since the current environment is in scope use ThrowError on that, instead of having to lookup the Environment again. Added benefit, lint the source code. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
1 parent bb1f68f commit efe1781

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/node_crypto.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,19 +344,19 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
344344
#ifndef OPENSSL_NO_SSL3
345345
method = SSLv3_method();
346346
#else
347-
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
347+
return env->ThrowError("SSLv3 methods disabled");
348348
#endif
349349
} else if (strcmp(*sslmethod, "SSLv3_server_method") == 0) {
350350
#ifndef OPENSSL_NO_SSL3
351351
method = SSLv3_server_method();
352352
#else
353-
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
353+
return env->ThrowError("SSLv3 methods disabled");
354354
#endif
355355
} else if (strcmp(*sslmethod, "SSLv3_client_method") == 0) {
356356
#ifndef OPENSSL_NO_SSL3
357357
method = SSLv3_client_method();
358358
#else
359-
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
359+
return env->ThrowError("SSLv3 methods disabled");
360360
#endif
361361
} else if (strcmp(*sslmethod, "SSLv23_method") == 0) {
362362
method = SSLv23_method();

0 commit comments

Comments
 (0)