Class RconException
java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.theword.queqiao.core.exception.QueQiaoException
io.github.theword.queqiao.core.exception.rcon.RconException
- All Implemented Interfaces:
Serializable
Rcon 相关异常
携带 RconException.Kind 以便调用方区分失败性质并映射到合适的协议状态码:
未启用/未连接属于"服务暂不可用",命令执行失败属于服务端错误,
二者不应被统一当作调用方的请求格式错误。
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRconException(String message) RconException(String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic RconExceptionstatic RconExceptioncommandFailed(Throwable cause) static RconExceptiondisabled()static RconExceptiongetKind()获取失败性质static RconExceptionstatic RconExceptioninvalidCommand(String message) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RconException
-
RconException
-
-
Method Details
-
getKind
获取失败性质- Returns:
- 失败性质,永不为 null
-
disabled
-
disconnected
-
clientDisconnected
-
invalidCommand
-
invalidCommand
-
commandFailed
-