Skip to content

Commit 6273408

Browse files
committed
fix formatting and remove unused newThrowable function
1 parent 7a65135 commit 6273408

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

src/java.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -997,15 +997,6 @@ NAN_METHOD(Java::instanceOf) {
997997
void 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
10101001
void EIO_AfterCallJs(uv_work_t* req, int status) {
10111002
#else
@@ -1095,12 +1086,12 @@ void EIO_AfterCallJs(uv_work_t* req) {
10951086
}
10961087

10971088
void 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

11061097
JNIEXPORT jobject JNICALL Java_node_NodeDynamicProxyClass_callJs(JNIEnv *env, jobject src, jlong ptr, jobject method, jobjectArray args) {

0 commit comments

Comments
 (0)