From 9e79d407665414b13358fa550cabbefca7232929 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 13 Jul 2017 14:37:46 +0200 Subject: [PATCH] provide a cause for CompoundRuntimeException to get at least one stack trace when it's used as a cause --- .../src/com/intellij/util/lang/CompoundRuntimeException.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/util/src/com/intellij/util/lang/CompoundRuntimeException.java b/platform/util/src/com/intellij/util/lang/CompoundRuntimeException.java index caf014b8d5f3..7d7ecb1442a2 100644 --- a/platform/util/src/com/intellij/util/lang/CompoundRuntimeException.java +++ b/platform/util/src/com/intellij/util/lang/CompoundRuntimeException.java @@ -37,6 +37,11 @@ public class CompoundRuntimeException extends RuntimeException { myExceptions = throwables; } + @Override + public synchronized Throwable getCause() { + return ContainerUtil.getFirstItem(myExceptions); + } + public List getExceptions() { return myExceptions; }