mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-11 12:19:00 +00:00
* rewritten how it works a bit: Now compatible with parent exceptions that don't have the Throwable variants. * rewritten how it works a bit: You can now provide the full constructor only; the rest will forward to it. * fixing up style. * rewrite the docs.
34 lines
1.3 KiB
Java
34 lines
1.3 KiB
Java
import lombok.AccessLevel;
|
|
import lombok.experimental.StandardException;
|
|
@StandardException class EmptyException extends Exception {
|
|
public @java.lang.SuppressWarnings("all") EmptyException() {
|
|
this(null, null);
|
|
}
|
|
public @java.lang.SuppressWarnings("all") EmptyException(final java.lang.String message) {
|
|
this(message, null);
|
|
}
|
|
public @java.lang.SuppressWarnings("all") EmptyException(final java.lang.Throwable cause) {
|
|
this(((cause != null) ? cause.getMessage() : null), cause);
|
|
}
|
|
public @java.lang.SuppressWarnings("all") EmptyException(final java.lang.String message, final java.lang.Throwable cause) {
|
|
super(message);
|
|
if ((cause != null))
|
|
super.initCause(cause);
|
|
}
|
|
}
|
|
@StandardException(access = AccessLevel.PROTECTED) class NoArgsException extends Exception {
|
|
public NoArgsException() {
|
|
super();
|
|
}
|
|
protected @java.lang.SuppressWarnings("all") NoArgsException(final java.lang.String message) {
|
|
this(message, null);
|
|
}
|
|
protected @java.lang.SuppressWarnings("all") NoArgsException(final java.lang.Throwable cause) {
|
|
this(((cause != null) ? cause.getMessage() : null), cause);
|
|
}
|
|
protected @java.lang.SuppressWarnings("all") NoArgsException(final java.lang.String message, final java.lang.Throwable cause) {
|
|
super(message);
|
|
if ((cause != null))
|
|
super.initCause(cause);
|
|
}
|
|
} |