Package io.github.mahmoudimus.quic
Class QuicException
java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.mahmoudimus.quic.QuicException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FrameException
A QUIC connection error (RFC 9000 section 20), carrying the error code a
CONNECTION_CLOSE
frame sends to the peer. TLS alerts map to the CRYPTO_ERROR range 0x0100–
0x01ff (RFC 9001 section 4.8).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe AEAD confidentiality or integrity limit was reached.static final longThe application asked for the connection to close.static final longThe peer used more connection IDs than allowed.static final longThe server refused the connection.static final longMore CRYPTO data than could be buffered.static final longThe base of the TLS alert range:CRYPTO_ERROR + alert.static final longA stream's final size changed or was exceeded.static final longThe peer sent more data than its flow-control limits allowed.static final longA frame could not be decoded.static final longAn implementation error.static final longAn invalid address-validation token.static final longA key update error.static final longNo error.static final longNo viable network path.static final longAny other protocol violation.static final longThe peer opened more streams than allowed.static final longA frame arrived for a stream in a state that does not permit it.static final longTransport parameters were malformed, missing or invalid. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcode()The transport error code.static QuicExceptionA TLS alert as a connection error.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
NO_ERROR
public static final long NO_ERRORNo error.- See Also:
-
INTERNAL_ERROR
public static final long INTERNAL_ERRORAn implementation error.- See Also:
-
CONNECTION_REFUSED
public static final long CONNECTION_REFUSEDThe server refused the connection.- See Also:
-
FLOW_CONTROL_ERROR
public static final long FLOW_CONTROL_ERRORThe peer sent more data than its flow-control limits allowed.- See Also:
-
STREAM_LIMIT_ERROR
public static final long STREAM_LIMIT_ERRORThe peer opened more streams than allowed.- See Also:
-
STREAM_STATE_ERROR
public static final long STREAM_STATE_ERRORA frame arrived for a stream in a state that does not permit it.- See Also:
-
FINAL_SIZE_ERROR
public static final long FINAL_SIZE_ERRORA stream's final size changed or was exceeded.- See Also:
-
FRAME_ENCODING_ERROR
public static final long FRAME_ENCODING_ERRORA frame could not be decoded.- See Also:
-
TRANSPORT_PARAMETER_ERROR
public static final long TRANSPORT_PARAMETER_ERRORTransport parameters were malformed, missing or invalid.- See Also:
-
CONNECTION_ID_LIMIT_ERROR
public static final long CONNECTION_ID_LIMIT_ERRORThe peer used more connection IDs than allowed.- See Also:
-
PROTOCOL_VIOLATION
public static final long PROTOCOL_VIOLATIONAny other protocol violation.- See Also:
-
INVALID_TOKEN
public static final long INVALID_TOKENAn invalid address-validation token.- See Also:
-
APPLICATION_ERROR
public static final long APPLICATION_ERRORThe application asked for the connection to close.- See Also:
-
CRYPTO_BUFFER_EXCEEDED
public static final long CRYPTO_BUFFER_EXCEEDEDMore CRYPTO data than could be buffered.- See Also:
-
KEY_UPDATE_ERROR
public static final long KEY_UPDATE_ERRORA key update error.- See Also:
-
AEAD_LIMIT_REACHED
public static final long AEAD_LIMIT_REACHEDThe AEAD confidentiality or integrity limit was reached.- See Also:
-
NO_VIABLE_PATH
public static final long NO_VIABLE_PATHNo viable network path.- See Also:
-
CRYPTO_ERROR
public static final long CRYPTO_ERRORThe base of the TLS alert range:CRYPTO_ERROR + alert.- See Also:
-
-
Constructor Details
-
QuicException
A connection error.- Parameters:
code- the transport error codereason- the reason phrase, sent to the peer
-
-
Method Details
-
tlsAlert
A TLS alert as a connection error.- Parameters:
alert- the TLS alert description, such as 40 (handshake_failure)reason- the reason phrase- Returns:
- the error, with code
0x0100 + alert
-
code
public long code()The transport error code.- Returns:
- the code
-