diff --git a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java b/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java index e344140be6f..0ea161343e0 100644 --- a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java +++ b/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java @@ -24,10 +24,13 @@ public class ExceptionUtils { /** * Translate exception to unchecked exception. */ - public static RuntimeException rethrow(Exception e) { + public static RuntimeException rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } + else if (e instanceof Error) { + throw (Error) e; + } else { throw new RuntimeException(e); }