Skip to content

Commit f8374a5

Browse files
committed
Update BlackReflection.java
1 parent 8d15842 commit f8374a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
152152
return call;
153153
} catch (Throwable throwable) {
154154
if (DEBUG) {
155-
throwable.printStackTrace();
155+
if (throwable.getCause() != null) {
156+
throwable.getCause().printStackTrace();
157+
} else {
158+
throwable.printStackTrace();
159+
}
156160
}
157161
if (throwable instanceof BlackNullPointerException) {
158162
throw new NullPointerException(throwable.getMessage());

0 commit comments

Comments
 (0)