-
new Error(code, message)
-
The constructor for a
ErrorObject. PCCViewer. Error inherits from the JavaScript Error.Parameters:
Name Type Description codestring A string that indicates the error code. As a convention used across PCC client and server, the code should be PascalCased and should not contain any spaces.
messagestring A developer readable string that indicates details of the error.
Example
// assume we already have a PCCViewer.Mark object created var error = new PCCViewer.Error('ResponseEmpty', 'Empty/invalid response from the server');