Class: Error

Error


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
json Object
Overrides:
Returns:
Error this

<static> isInstance(obj)

Check whether the given object is an instance of this class.
Parameters:
Name Type Description
obj Object
Returns:
Type
Boolean

setCode(code)

Set the code
Parameters:
Name Type Description
code Integer
Returns:
this
Type
Error

setLabel(label)

Set the label
Parameters:
Name Type Description
label String
Returns:
this
Type
Error

setMessage(message)

Set the message
Parameters:
Name Type Description
message String
Returns:
this
Type
Error

setStacktrace(stacktrace)

Set the stacktrace
Parameters:
Name Type Description
stacktrace String
Returns:
this
Type
Error

toJSON()

Export the object as JSON
Overrides:
Returns:
JSON object
Type
Object