public class PRException extends RuntimeException
| 限定符和类型 | 字段和说明 |
|---|---|
protected static PRException |
IMPOSSIBLE |
protected FailureMsg |
msg |
protected static PRException |
SERVER_ERROR |
| 限定符 | 构造器和说明 |
|---|---|
protected |
PRException(FailureMsg msg,
Throwable cause) |
| 限定符和类型 | 方法和说明 |
|---|---|
Response<Void> |
exceptionCaught(Consumer<PRException> consumer) |
<T> T |
exceptionCaught(Consumer<PRException> consumer,
Function<FailureMsg,T> mapper) |
static PRException |
impossible() |
FailureMsg |
msg() |
static PRException |
of() |
static PRException |
of(FailureMsg msg) |
static PRException |
of(FailureMsg msg,
Throwable cause) |
static PRException |
of(Throwable cause) |
static void |
requireNon(boolean condition,
FailureMsg msg) |
static void |
requireNon(boolean condition,
Supplier<FailureMsg> msg) |
protected final FailureMsg msg
protected static final PRException SERVER_ERROR
protected static final PRException IMPOSSIBLE
protected PRException(FailureMsg msg, Throwable cause)
public static PRException of(FailureMsg msg, Throwable cause)
public static PRException of(FailureMsg msg)
public static PRException of(Throwable cause)
public static PRException of()
public final FailureMsg msg()
public static PRException impossible()
public static void requireNon(boolean condition,
FailureMsg msg)
public static void requireNon(boolean condition,
Supplier<FailureMsg> msg)
public final <T> T exceptionCaught(Consumer<PRException> consumer, Function<FailureMsg,T> mapper)
public final Response<Void> exceptionCaught(Consumer<PRException> consumer)
Copyright © 2022. All rights reserved.