Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
SandHook
Commits
c1e5d6e2
Commit
c1e5d6e2
authored
Jan 25, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test catch exception
parent
4659bc6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
gradle.xml
.idea/gradle.xml
+1
-0
TestClass.java
app/src/main/java/com/swift/sandhook/test/TestClass.java
+1
-0
CtrHook.java
...src/main/java/com/swift/sandhook/testHookers/CtrHook.java
+6
-1
No files found.
.idea/gradle.xml
View file @
c1e5d6e2
...
...
@@ -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"
/>
...
...
app/src/main/java/com/swift/sandhook/test/TestClass.java
View file @
c1e5d6e2
...
...
@@ -12,6 +12,7 @@ public class TestClass {
public
void
add1
()
{
a
++;
b
++;
throw
new
RuntimeException
(
"test exception"
);
}
public
void
add2
()
{
...
...
app/src/main/java/com/swift/sandhook/testHookers/CtrHook.java
View file @
c1e5d6e2
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment