mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-12 18:16:29 +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.
36 lines
1.1 KiB
Java
36 lines
1.1 KiB
Java
class EmptyException extends Exception {
|
|
@java.lang.SuppressWarnings("all")
|
|
public EmptyException() {
|
|
this(null, null);
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
public EmptyException(final java.lang.String message) {
|
|
this(message, null);
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
public EmptyException(final java.lang.Throwable cause) {
|
|
this(cause != null ? cause.getMessage() : null, cause);
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
public EmptyException(final java.lang.String message, final java.lang.Throwable cause) {
|
|
super(message);
|
|
if (cause != null) super.initCause(cause);
|
|
}
|
|
}
|
|
class NoArgsException extends Exception {
|
|
public NoArgsException() {
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
protected NoArgsException(final java.lang.String message) {
|
|
this(message, null);
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
protected NoArgsException(final java.lang.Throwable cause) {
|
|
this(cause != null ? cause.getMessage() : null, cause);
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
protected NoArgsException(final java.lang.String message, final java.lang.Throwable cause) {
|
|
super(message);
|
|
if (cause != null) super.initCause(cause);
|
|
}
|
|
} |