Skip to content

Commit 6844f0c

Browse files
committed
some methods renaming
1 parent dcb2553 commit 6844f0c

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

test-app/runtime/src/main/cpp/Runtime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ bool Runtime::TryCallGC() {
371371
return success;
372372
}
373373

374-
void Runtime::PassUncaughtExceptionToJsNative(JNIEnv* env, jobject obj, jthrowable exception, jstring stackTrace, jboolean isDiscarded) {
374+
void Runtime::PassExceptionToJsNative(JNIEnv* env, jobject obj, jthrowable exception, jstring stackTrace, jboolean isDiscarded) {
375375
auto isolate = m_isolate;
376376

377377
//create error message

test-app/runtime/src/main/cpp/Runtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Runtime {
5252
void AdjustAmountOfExternalAllocatedMemory();
5353
bool NotifyGC(JNIEnv* env, jobject obj);
5454
bool TryCallGC();
55-
void PassUncaughtExceptionToJsNative(JNIEnv* env, jobject obj, jthrowable exception, jstring stackTrace, jboolean isDiscarded);
55+
void PassExceptionToJsNative(JNIEnv* env, jobject obj, jthrowable exception, jstring stackTrace, jboolean isDiscarded);
5656
void PassUncaughtExceptionFromWorkerToMainHandler(v8::Local<v8::String> message, v8::Local<v8::String> stackTrace, v8::Local<v8::String> filename, int lineno);
5757
void ClearStartupData(JNIEnv* env, jobject obj);
5858
void DestroyRuntime();

test-app/runtime/src/main/cpp/com_tns_Runtime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ extern "C" JNIEXPORT void Java_com_tns_Runtime_unlock(JNIEnv* env, jobject obj,
245245
}
246246
}
247247

248-
extern "C" JNIEXPORT void Java_com_tns_Runtime_passUncaughtExceptionToJsNative(JNIEnv* env, jobject obj, jint runtimeId, jthrowable exception, jstring stackTrace, jboolean isDiscarded) {
248+
extern "C" JNIEXPORT void Java_com_tns_Runtime_passExceptionToJsNative(JNIEnv* env, jobject obj, jint runtimeId, jthrowable exception, jstring stackTrace, jboolean isDiscarded) {
249249
auto runtime = TryGetRuntime(runtimeId);
250250
if (runtime == nullptr) {
251251
return;
@@ -256,7 +256,7 @@ extern "C" JNIEXPORT void Java_com_tns_Runtime_passUncaughtExceptionToJsNative(J
256256
v8::HandleScope handleScope(isolate);
257257

258258
try {
259-
runtime->PassUncaughtExceptionToJsNative(env, obj, exception, stackTrace, isDiscarded);
259+
runtime->PassExceptionToJsNative(env, obj, exception, stackTrace, isDiscarded);
260260
} catch (NativeScriptException& e) {
261261
e.ReThrowToJava();
262262
} catch (std::exception e) {

test-app/runtime/src/main/java/com/tns/Runtime.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private native void initNativeScript(int runtimeId, String filesPath, String nat
5151
private native void lock(int runtimeId);
5252
private native void unlock(int runtimeId);
5353

54-
private native void passUncaughtExceptionToJsNative(int runtimeId, Throwable ex, String stackTrace, boolean isDiscarded);
54+
private native void passExceptionToJsNative(int runtimeId, Throwable ex, String stackTrace, boolean isDiscarded);
5555

5656
private native void clearStartupData(int runtimeId);
5757

@@ -72,12 +72,12 @@ private native void initNativeScript(int runtimeId, String filesPath, String nat
7272
private static native void ResetDateTimeConfigurationCache(int runtimeId);
7373

7474
void passUncaughtExceptionToJs(Throwable ex, String stackTrace) {
75-
passUncaughtExceptionToJsNative(getRuntimeId(), ex, stackTrace, false);
75+
passExceptionToJsNative(getRuntimeId(), ex, stackTrace, false);
7676
}
7777

7878
void passDiscardedExceptionToJs(Throwable ex, String message) {
7979
String stackTrace = message + Runtime.getStackTraceErrorMessage(ex);
80-
passUncaughtExceptionToJsNative(getRuntimeId(), ex, stackTrace, true);
80+
passExceptionToJsNative(getRuntimeId(), ex, stackTrace, true);
8181
}
8282

8383
public static void passSuppressedExceptionToJs(Throwable ex, String methodName) {

0 commit comments

Comments
 (0)