Package com.contentstack.sdk
Class Error
- java.lang.Object
-
- com.contentstack.sdk.Error
-
public class Error extends Object
-
-
Constructor Summary
Constructors Constructor Description Error()
-
Method Summary
Modifier and Type Method Description intgetErrorCode()Returns error codeStringgetErrorMessage()Returns error in string format.Map<String,Object>getErrors()Returns error in HashMap format where error is key and its respective information as HashMap's value.protected voidsetErrorCode(int errorCode)protected voidsetErrorMessage(String errorMessage)protected voidsetErrors(HashMap<String,Object> errorHashMap)
-
-
-
Method Detail
-
getErrorMessage
public String getErrorMessage()
Returns error in string format.- Returns:
- String error message
Example :
String errorString = error.getErrorMessage();
-
setErrorMessage
protected void setErrorMessage(String errorMessage)
-
getErrorCode
public int getErrorCode()
Returns error code- Returns:
- int value.
Example :
int errorCode = error.getErrorCode();
-
setErrorCode
protected void setErrorCode(int errorCode)
-
getErrors
public Map<String,Object> getErrors()
Returns error in HashMap format where error is key and its respective information as HashMap's value.- Returns:
- Map Error Hashmap
Example :
HashMap<String, Object> errorHashMap = error.getErrors();
-
-