WebIgnoreServerError Function

Action

Modifies the error severity of a specified server error for the subsequent web function call. This can be done for a specified amount of server errors or for all.

Include file

WebAPI.bdh

Syntax

WebIgnoreServerError( in nStatusCode : number,
                      in nSeverity   : number optional := SEVERITY_SUCCESS,
                      in nCount      : number optional );

Return value

  • none

Parameter Description
nStatusCode Server status code to ignore or change the severity for (e.g. 404).
nSeverity Optional: Severity of the error that is raised if the verification fails. Can be one of the following values:
  • SEVERITY_SUCCESS: (Default) 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)
nCount The specified error can occur nCount times before an error with the default severity is raised. If this parameter is omitted the specified severity is valid for all server responses

Example

dcltrans
transaction TWeb
begin
  WebIgnoreServerError(404);
  WebUrl("http://standardhost/", 0.0);
  WebIgnoreServerError(404, SEVERITY_SUCCESS, 3);
  WebIgnoreServerError(500, SEVERITY_WARNING);
  WebPageUrl("http://standardhost/");
end TWeb;