FUS: don't report stacktrace for kotlin compilator exception

GitOrigin-RevId: 27f3f1076f8605e04dbee553e376912effa11f08
This commit is contained in:
Svetlana.Zemlyanskaya
2020-06-15 18:02:36 +03:00
committed by intellij-monorepo-bot
parent 16e23c9b47
commit 034a2eb3c1
@@ -18,7 +18,17 @@ public final class ThrowableDescription {
public ThrowableDescription(@Nullable Throwable throwable) {
myThrowable = throwable != null ? getCause(throwable) : null;
myStacktrace = myThrowable != null ? myThrowable.getStackTrace() : null;
myStacktrace = myThrowable != null ? getStacktrace(myThrowable) : null;
}
private static StackTraceElement @Nullable [] getStacktrace(@NotNull Throwable throwable) {
try {
return throwable.getStackTrace();
}
catch (Throwable e) {
// Kotlin internals might throw an exception and it doesn't support retrieving a stacktrace
return null;
}
}
@NotNull