Commit c1e5d6e2 authored by swift_gan's avatar swift_gan

test catch exception

parent 4659bc6e
......@@ -9,6 +9,7 @@
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/hooklib" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
......
......@@ -12,6 +12,7 @@ public class TestClass {
public void add1 () {
a++;
b++;
throw new RuntimeException("test exception");
}
public void add2 () {
......
......@@ -27,7 +27,12 @@ public class CtrHook {
@HookMethod("add1")
public static void onAdd1(TestClass thiz) {
Log.e("TestClassHook", "add1 been hooked");
onAdd1Backup(thiz);
try {
onAdd1Backup(thiz);
} catch (Exception e) {
e.printStackTrace();
}
}
@HookMethodBackup("add1")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment