ErrorAdd Function


Defines the severity of a particular problem. If the problem occurs during a test, Silk Performer terminates either the current transaction or the entire simulation, depending on the severity that you have defined for the problem.

Include file



ErrorAdd( in nFacility : number,
          in nCode     : number,
          in nSeverity : number );
Parameter Description
nFacility Specifies the module that can cause the problem for which you define the severity.
nCode Error code of the problem for which you want to define the severity. For a list of error codes, select Settings/Active Profile from the Silk Performer menu bar, select the Replay category, click the Simulation icon, switch to the Errors tab, and click Add. In the ensuing dialog, select the respective module from the Module drop-down list to see a list of error codes.
nSeverity Severity of the error that is raised if the verification fails. Can be one of the following values:
  • SEVERITY_SUCCESS: Success; no error (numerical value: 0)
  • SEVERITY_INFORMATIONAL: Informational; no error (numerical value: 1)
  • SEVERITY_WARNING: Warning; no error (numerical value: 2)
  • SEVERITY_ERROR: Error; simulation continues (numerical value: 3)
  • SEVERITY_TRANS_EXIT: Error; the active transaction is aborted (numerical value: 4)
  • SEVERITY_PROCESS_EXIT: Error; the simulation is aborted (numerical value: 5)


  transaction TMain
    ErrorRemove(FACILITY_HTTP, 401);
  end TMain;