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>
This commit is contained in:
Timothy J Fontaine authored and Julien Gilli committed 2015-01-16 11:03:30 -08:00
1 parent bb1f68f9d6
commit efe1781f3d
1 file changed
+3 -3
+3 -3
View File
@@ -344,19 +344,19 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
#ifndef OPENSSL_NO_SSL3
method = SSLv3_method();
#else
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
return env->ThrowError("SSLv3 methods disabled");
#endif
} else if (strcmp(*sslmethod, "SSLv3_server_method") == 0) {
#ifndef OPENSSL_NO_SSL3
method = SSLv3_server_method();
#else
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
return env->ThrowError("SSLv3 methods disabled");
#endif
} else if (strcmp(*sslmethod, "SSLv3_client_method") == 0) {
#ifndef OPENSSL_NO_SSL3
method = SSLv3_client_method();
#else
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
return env->ThrowError("SSLv3 methods disabled");
#endif
} else if (strcmp(*sslmethod, "SSLv23_method") == 0) {
method = SSLv23_method();