reportError()

Report an error to the server after handling it. Note that the method should be used only if the try-catch mechanism of error handling is not desired or not functional, such as in nested promises.

Signature

reportError (String message, Error error)

Parameters

message
Type: String
The error message.
error
Type: Error
An error object to be included in handling and reporting.