We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 321e6d9 commit 52b7fa2Copy full SHA for 52b7fa2
test-app/runtime/src/main/java/com/tns/Runtime.java
@@ -283,11 +283,14 @@ private static String getStackTraceOnly(String content) {
283
}
284
285
public static String getJSStackTrace(Throwable ex) {
286
- if (ex instanceof NativeScriptException) {
287
- return ((NativeScriptException) ex).getIncomingStackTrace();
288
- } else {
289
- return null;
+ Throwable cause = ex;
+ while(cause != null) {
+ if(cause instanceof NativeScriptException) {
+ return ((NativeScriptException) cause).getIncomingStackTrace();
290
+ }
291
+ cause = cause.getCause();
292
293
+ return null;
294
295
296
public static String getStackTraceErrorMessage(Throwable ex) {
0 commit comments