mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 20:15:11 +00:00
Handle [native code] stack frames
Reviewed By: ashwinb, javache Differential Revision: D5104078 fbshipit-source-id: edefc7cb7e1d401155372c917875ad8b14af94e9
This commit is contained in:
parent
a975c1e834
commit
0ee8786cd8
@ -174,6 +174,9 @@ public class StackTraceHelper {
|
||||
String[] stackTrace = stack.split("\n");
|
||||
StackFrame[] result = new StackFrame[stackTrace.length];
|
||||
for (int i = 0; i < stackTrace.length; ++i) {
|
||||
if (stackTrace[i].equals("[native code]")) {
|
||||
result[i] = new StackFrameImpl(null, stackTrace[i], -1, -1);
|
||||
} else {
|
||||
Matcher matcher = STACK_FRAME_PATTERN.matcher(stackTrace[i]);
|
||||
if (!matcher.find()) {
|
||||
throw new IllegalArgumentException(
|
||||
@ -186,6 +189,7 @@ public class StackTraceHelper {
|
||||
Integer.parseInt(matcher.group(3)),
|
||||
Integer.parseInt(matcher.group(4)));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user