diff --git a/src/node_crypto.cc b/src/node_crypto.cc index e1dd06c4086..03650a98c61 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -344,19 +344,19 @@ void SecureContext::Init(const FunctionCallbackInfo& 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();