Skip to content

Commit

Permalink
catch error to quickly fix
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed May 13, 2024
1 parent 775cc63 commit 70b299d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ public static void dumpWindowHierarchy(UiDevice device, OutputStream out) throws
serializer.attribute("", "rotation", Integer.toString(device.getDisplayRotation()));

for (AccessibilityNodeInfo root : getWindowRoots(device)) {
dumpNodeRec(root, serializer, 0, device.getDisplayWidth(),
device.getDisplayHeight());
try {
dumpNodeRec(root, serializer, 0, device.getDisplayWidth(),
device.getDisplayHeight());
} catch (IllegalArgumentException e) {
// java.lang.IllegalArgumentException: Illegal character (U+0)
e.printStackTrace();
}
}

serializer.endTag("", "hierarchy");
Expand Down

0 comments on commit 70b299d

Please sign in to comment.