Package io.servicetalk.http.api
Class Http2Exception
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
io.servicetalk.http.api.Http2Exception
- All Implemented Interfaces:
Serializable
An exception that represents a http/2 error.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttp2Exception
(int streamId, Http2ErrorCode error, String message) Create a new instance.Http2Exception
(int streamId, Http2ErrorCode error, String message, Throwable cause) Create a new instance.Http2Exception
(int streamId, Http2ErrorCode error, Throwable cause) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal Http2ErrorCode
Get the error code which caused this exception.final int
streamId()
The Stream Identifier associated with the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Http2Exception
Create a new instance.- Parameters:
streamId
- Stream Identifier the exception relates to.0
for the connection stream or> 0
for a non-connection stream.error
- The error code.message
- The detail message (which is saved for later retrieval by theThrowable.getMessage()
method).
-
Http2Exception
Create a new instance.- Parameters:
streamId
- Stream Identifier the exception relates to.0
for the connection stream or> 0
for a non-connection stream.error
- The error code.cause
- The original cause which lead to this exception.
-
Http2Exception
Create a new instance.- Parameters:
streamId
- Stream Identifier the exception relates to.0
for the connection stream or> 0
for a non-connection stream.error
- The error code.message
- The detail message (which is saved for later retrieval by theThrowable.getMessage()
method).cause
- The original cause which lead to this exception.
-
-
Method Details
-
errorCode
Get the error code which caused this exception.- Returns:
- the error code which caused this exception.
-
streamId
public final int streamId()The Stream Identifier associated with the exception.- Returns:
0
for the connection stream,> 0
for a non-connection stream, or< 0
if unknown.
-