mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 06:16:14 +00:00
Made 'Throwable.class' the default for SneakyThrows.
This commit is contained in:
1 parent
f6778b0426
commit
58d0ada6d7
1 file changed
+4
-1
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user