Package software.amazon.awssdk.crt.http
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
software.amazon.awssdk.crt.http.HttpException
- All Implemented Interfaces:
Serializable
This exception will be thrown by any exceptional cases encountered within the
JNI bindings to the AWS Common Runtime
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the error code captured when the exception occurred.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
public HttpException(int errorCode) Constructs a new HttpException- Parameters:
errorCode
- native error code representing the error source/reason
-
-
Method Details
-
getErrorCode
public int getErrorCode()Returns the error code captured when the exception occurred. This can be fed to CRT.awsErrorString() to get a user-friendly error string- Returns:
- The error code associated with this exception
-