new Error( [json])
A common representation of an error on the FamilySearch platform.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
json |
Object |
<optional> |
Extends
Methods
-
getCode()
-
Get the code
Returns:
code- Type
- Integer
-
getLabel()
-
Get the label
Returns:
label- Type
- String
-
getMessage()
-
Get the message
Returns:
message- Type
- String
-
getStacktrace()
-
Get the stacktrace
Returns:
stacktrace- Type
- String
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description jsonObject - Overrides:
Returns:
Error this -
<static> isInstance(obj)
-
Check whether the given object is an instance of this class.
Parameters:
Name Type Description objObject Returns:
- Type
- Boolean
-
setCode(code)
-
Set the code
Parameters:
Name Type Description codeInteger Returns:
this- Type
- Error
-
setLabel(label)
-
Set the label
Parameters:
Name Type Description labelString Returns:
this- Type
- Error
-
setMessage(message)
-
Set the message
Parameters:
Name Type Description messageString Returns:
this- Type
- Error
-
setStacktrace(stacktrace)
-
Set the stacktrace
Parameters:
Name Type Description stacktraceString Returns:
this- Type
- Error
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object