ErrorMessageParser Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. deps. serializer. ErrorMessageParser
- com.
public class ErrorMessageParser
Representation of a single error message collection with a Json deserializer.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| ErrorMessageParser() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static int |
bestErrorCode(String fullErrorMessage)
Get the fully qualified error code from the http response message error |
| static java.lang.String |
bestErrorMessage(String fullErrorMessage)
Parse the full |
| static int | getDefaultErrorCode() |
Methods inherited from java.lang.Object
Constructor Details
ErrorMessageParser
public ErrorMessageParser()
Method Details
bestErrorCode
public static int bestErrorCode(String fullErrorMessage)
Get the fully qualified error code from the http response message errorReason, if one exists.
Parameters:
Returns:
bestErrorMessage
public static String bestErrorMessage(String fullErrorMessage)
Parse the fullErrorMessage from the IoTHub to find the root cause of the problem, after that, return a string with the best information about the issue
Parameters:
Returns:
getDefaultErrorCode
public static int getDefaultErrorCode()