From 346a4c9688537a1a22f29e07a016887fb9d3cb53 Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Sat, 28 May 2016 00:52:00 +0300 Subject: [PATCH] TW-45441 revert and clarify: do not wrap RuntimeException --- .../intellij/openapi/application/impl/LaterInvocator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/application/impl/LaterInvocator.java b/platform/platform-impl/src/com/intellij/openapi/application/impl/LaterInvocator.java index fdc1f0bd252b..77ffe3a3c384 100644 --- a/platform/platform-impl/src/com/intellij/openapi/application/impl/LaterInvocator.java +++ b/platform/platform-impl/src/com/intellij/openapi/application/impl/LaterInvocator.java @@ -172,9 +172,9 @@ public class LaterInvocator { invokeLater(runnable1, modalityState); semaphore.waitFor(); if (!exception.isNull()) { - Throwable throwable = exception.get(); - if (throwable instanceof RuntimeException) throw (RuntimeException)throwable; - throw new RuntimeException(throwable); + // wrap everything to keep the current thread stacktrace + // also TC ComparisonFailure feature depends on this + throw new RuntimeException(exception.get()); } }