@@ -997,15 +997,6 @@ NAN_METHOD(Java::instanceOf) {
997997void EIO_CallJs (uv_work_t * req) {
998998}
999999
1000- jthrowable newThrowable (JNIEnv* env, const char * excClassName, std::string msg) {
1001- jclass newExcCls = env->FindClass (excClassName);
1002- jthrowable throwable = env->ExceptionOccurred ();
1003- if (throwable != NULL ) {
1004- return throwable; // this should only be Errors, according to the docs
1005- }
1006- env->ThrowNew (newExcCls, msg.c_str ());
1007- }
1008-
10091000#if NODE_MINOR_VERSION >= 10
10101001void EIO_AfterCallJs (uv_work_t * req, int status) {
10111002#else
@@ -1095,12 +1086,12 @@ void EIO_AfterCallJs(uv_work_t* req) {
10951086}
10961087
10971088void throwNewThrowable (JNIEnv* env, const char * excClassName, std::string msg) {
1098- jclass newExcCls = env->FindClass (excClassName);
1099- jthrowable throwable = env->ExceptionOccurred ();
1100- if (throwable != NULL ) {
1101- env->Throw (throwable); // this should only be Errors, according to the docs
1102- }
1103- env->ThrowNew (newExcCls, msg.c_str ());
1089+ jclass newExcCls = env->FindClass (excClassName);
1090+ jthrowable throwable = env->ExceptionOccurred ();
1091+ if (throwable != NULL ) {
1092+ env->Throw (throwable); // this should only be Errors, according to the docs
1093+ }
1094+ env->ThrowNew (newExcCls, msg.c_str ());
11041095}
11051096
11061097JNIEXPORT jobject JNICALL Java_node_NodeDynamicProxyClass_callJs (JNIEnv *env, jobject src, jlong ptr, jobject method, jobjectArray args) {
0 commit comments