From cfc1d6d271c7370c9e3b5ce9f644373754177c8d Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Thu, 28 Jun 2012 15:06:46 +0400 Subject: [PATCH] Added clarifying comment for ExceptionUtils.rethrow() --- compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java | 4 ++++ 1 file changed, 4 insertions(+) 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) {