Created
December 8, 2010 14:49
-
-
Save kevsmith/733359 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Throws a checked {@link Exception} not declared in the method signature. | |
| * Clearly, this circumvents compiler safeguards, so use with caution. | |
| * You've been warned. | |
| * | |
| * @param exception | |
| * A checked (or unchecked) exception to be thrown. | |
| */ | |
| public static void throwChecked(final Throwable exception) { | |
| new CheckedThrower<RuntimeException>().throwChecked(exception); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment