mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Include stacktrace in RPC exception when available
This commit is contained in:
+5
-1
@@ -342,7 +342,7 @@ class Script(object):
|
||||
if operation == 'ok':
|
||||
value = params[0] if data is None else data
|
||||
else:
|
||||
error = Exception(params[0])
|
||||
error = RPCException(*params[0:2])
|
||||
|
||||
callback(value, error)
|
||||
|
||||
@@ -371,6 +371,10 @@ class Script(object):
|
||||
else:
|
||||
print(text, file=sys.stderr)
|
||||
|
||||
class RPCException(Exception):
|
||||
def __str__(self):
|
||||
return self.args[1] if len(self.args) >= 2 else self.args[0]
|
||||
|
||||
class ScriptExports(object):
|
||||
def __init__(self, script):
|
||||
self._script = script
|
||||
|
||||
Reference in New Issue
Block a user