|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.xtext.xbase.lib.Exceptions
public class Exceptions
Useful helper methods when dealing with exceptions.
| Constructor Summary | |
|---|---|
Exceptions()
|
|
| Method Summary | |
|---|---|
static java.lang.RuntimeException |
sneakyThrow(java.lang.Throwable t)
Throws the given exception and sneaks it through any compiler checks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Exceptions()
| Method Detail |
|---|
public static java.lang.RuntimeException sneakyThrow(java.lang.Throwable t)
throw sneakyThrow(new CheckedException("Catch me if you can ;-)")).
This method is heavily inspired by project
Lombok.
t - the throwable that should be sneaked through compiler checks. May not be null.
t is always thrown.
java.lang.NullPointerException - if t is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||