You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In most exceptions I've seen, the actual Java exception class name (like "com.android.uiautomator.core.UiObjectNotFoundException") is in the jsonresult that is received in JsonRPCMethod.call but it is thrown away when the wrapper exception JsonRPCError is created. It is trivial to include and greatly increases the readability of the exception. This has worked for me:
if "error" in jsonresult and jsonresult["error"]:
raise JsonRPCError(jsonresult["error"]["code"],
(jsonresult["error"]["data"]["exceptionTypeName"] +
": " +
jsonresult["error"]["message"]))
return jsonresult["result"]
I'll eventually get around to submitting a patch but it might be easier for something else who is more familiar with all the exceptions that can be thrown to fix it.
The text was updated successfully, but these errors were encountered:
In most exceptions I've seen, the actual Java exception class name (like "com.android.uiautomator.core.UiObjectNotFoundException") is in the jsonresult that is received in JsonRPCMethod.call but it is thrown away when the wrapper exception JsonRPCError is created. It is trivial to include and greatly increases the readability of the exception. This has worked for me:
I'll eventually get around to submitting a patch but it might be easier for something else who is more familiar with all the exceptions that can be thrown to fix it.
The text was updated successfully, but these errors were encountered: