public class IotHubException extends Exception
| Modifier and Type | Field and Description |
|---|---|
protected int |
errorCode
Provides the HTTP error code, if applicable.
|
protected com.microsoft.azure.sdk.iot.deps.serializer.ErrorCodeDescription |
errorCodeDescription
Provides the HTTP error code description, if applicable.
|
| Constructor and Description |
|---|
IotHubException()
Instantiate a new IotHubException with no details.
|
IotHubException(int errorCode,
String message)
Instantiate a new IotHubException.
|
IotHubException(String message)
Instantiate a new IotHubException.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected int errorCode
Provides the HTTP error code, if applicable.
This value will be a 6 digital error code such as 404001 if the service provided one in response message to the HTTP request. Otherwise it will be a 3 digit status code such as 404.
For AMQP operations such as sending cloud to device messages, receiving message feedback, and getting file upload notifications, this field will not be populated.
protected com.microsoft.azure.sdk.iot.deps.serializer.ErrorCodeDescription errorCodeDescription
Provides the HTTP error code description, if applicable.
For AMQP operations such as sending cloud to device messages, receiving message feedback, and getting file upload notifications, this field will not be populated.
public IotHubException()
public IotHubException(String message)
message - the human readable description for why this exception was thrown.public IotHubException(int errorCode,
String message)
errorCode - the Http status code (200, 401, 404, etc.)message - the human readable description for why this exception was thrown.Copyright © 2022. All rights reserved.