diff options
-rw-r--r-- | src/lombok/SneakyThrows.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lombok/SneakyThrows.java b/src/lombok/SneakyThrows.java index 62d2c752..41c608d8 100644 --- a/src/lombok/SneakyThrows.java +++ b/src/lombok/SneakyThrows.java @@ -58,11 +58,14 @@ import java.lang.annotation.Target; * } * </pre> * + * <code>@SneakyThrows</code> without a parameter defaults to allowing <i>every</i> checked exception. + * (The default is <code>Throwable.class</code>). + * * @see Lombok#sneakyThrow(Throwable) */ @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.SOURCE) public @interface SneakyThrows { /** The exception type(s) you want to sneakily throw onward. */ - Class<? extends Throwable>[] value(); + Class<? extends Throwable>[] value() default Throwable.class; } |