ForeSee Replay Specifications - Custom Error Configuration

FSR.logError

Logs an occurrence of a custom error

 

Syntax

FSR.logError()

FSR.logError(customName)

FSR.logError(customName, optionalData)

 

Parameters

customName is a case-sensitive string used to identify and group the custom errors.

optionalData is an optional object that can be passed to give additional contextual information about the custom error. The object will be captured as a string representation.

if no customName argument is given, empty string “” is used

if no optionalData is given, optionalData will be undefined

 

Returns

Does not return anything

 

Examples:

Calling FSR.logError within a script:

FSR.logError(“userSwitchedLocales”, {fromLocale: “CA”, toLocale: “US”});

FSR.logError(“forgotPassword”);

FSR.logError();

 

Calling FSR.logError as an event handler:

logs a custom error with customName value as “formInputFocused” and optionalData value as the name of the focused input

$(“input”).focus( function(){ if(clientDetectsError){ FSR.logError(“formInputFocused”, this.id) }});

Other articles in this section:

  1. Custom Error Configuration (current article)
  2. Custom Event Configuration