From e113294185a12ee2a93fb045ebd252bd3b30bf0a Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Thu, 14 Jun 2012 16:05:16 +0400 Subject: [PATCH] poor man Nothing --- .../util/src/org/jetbrains/jet/utils/ExceptionUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java b/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java index de8b7ac2b43..0e5d0c24bbb 100644 --- a/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java +++ b/compiler/util/src/org/jetbrains/jet/utils/ExceptionUtils.java @@ -23,10 +23,15 @@ import java.io.Closeable; */ public class ExceptionUtils { + public static class Nothing extends Error { + private Nothing() { + } + } + /** * Translate exception to unchecked exception. */ - public static RuntimeException rethrow(Throwable e) { + public static Nothing rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; }