|
@@ -133,7 +133,17 @@ public final class LogUtils {
|
133
|
133
|
}
|
134
|
134
|
|
135
|
135
|
if (throwable == null) {
|
136
|
|
- throw new ReflectiveOperationException("Unable to find ctor of " + clazz);
|
|
136
|
+ try {
|
|
137
|
+ // Or maybe just a throwable?
|
|
138
|
+ throwable = clazz.getConstructor(Throwable.class).newInstance(getThrowable(proxy.getCause()));
|
|
139
|
+ } catch (NoSuchMethodException ex) {
|
|
140
|
+ try {
|
|
141
|
+ throwable = clazz.getConstructor(String.class).newInstance(proxy.getMessage());
|
|
142
|
+ } catch (NoSuchMethodException ex2) {
|
|
143
|
+ // *Shrug*
|
|
144
|
+ throw new ReflectiveOperationException("Unable to find ctor of " + clazz);
|
|
145
|
+ }
|
|
146
|
+ }
|
137
|
147
|
}
|
138
|
148
|
}
|
139
|
149
|
throwable.setStackTrace(getStackTraceElements(proxy.getStackTraceElementProxyArray()));
|