diff --git a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java b/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java index de8b7ac2b43..b7413e8a05c 100644 --- a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java +++ b/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java @@ -25,6 +25,10 @@ public class ExceptionUtils { /** * Translate exception to unchecked exception. + * + * Return type is specified to make it possible to use it like this: + * throw ExceptionUtils.rethrow(e); + * In this case compiler knows that code after this rethrowing won't be executed. */ public static RuntimeException rethrow(Throwable e) { if (e instanceof RuntimeException) {