Error-Handling Functions

Silk Performer offers several functions to handle unexpected situations during a load or verification test. Unexpected situations mostly end up in warnings or errors.

A commonly used mechanism to query the current state during a virtual user run is the last error. The last error describes not more than the last error that occurred.

If several errors occurred at about the same time, only the last one is stored and can therefore be retrieved. Silk Performer goes a step beyond and lets the user access not only the last error but also some relevant errors that occurred before the last error. Each virtual user holds a so-called error stack where it stores errors for each erroneous function call.

The error stack is per function call and enables you to retrieve not only the last error but all errors of one erroneous function call. A next function call clears that error stack of the last function.

To step through the error stack the following error functions are provided:

An error consists of an error code, a facility and a severity.

The severity of an error 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: (Default) 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)

The error facility is provided as a way to categorize errors in respect to the area or module in which they originate.

To retrieve further information about a particular error the following functions are provided:

To create an error code and raise an error use the following functions:

Silk Performer offers the possibility to redefine (overwrite) the default severity of an error. This is useful in several scenarios. For example, the simulator is reporting an error with severity SEVERITY_ERROR but the user does not want to consider it to be a real error. In this case the user is able to overwrite the default severity with SEVERITY_INFORMATIONAL. This affects the simulator also, which does not increase the error count if this particular error occurs.

Functions, which allow severity manipulations, are:

Facility values:

Facility value Numeric value
FACILITY_SILKPERFORMER 1
FACILITY_WEBENGINE 2
FACILITY_HTTP 3
FACILITY_IIOP 4
FACILITY_COMMONLIB 5
FACILITY_WINSOCK 6
FACILITY_SSL 7
FACILITY_POP 8
FACILITY_SMTP 9
FACILITY_LDAP 10
FACILITY_ODBC 11
FACILITY_EVENTLOG 13
FACILITY_SCRIPTENGINE 14
FACILITY_PERFORB 15
FACILITY_FTP 16
FACILITY_SERVICE 17
FACILITY_ORA 20
FACILITY_PROXYENGINE 21
FACILITY_PERFORMANCE 22
FACILITY_TUXEDO 23
FACILITY_OCI 24
FACILITY_REPO 25
FACILITY_RT 26
FACILITY_PERFLM 27
FACILITY_JOLT 28
FACILITY_COM 29
FACILITY_LTC 30
FACILITY_PDH 31
FACILITY_PERFSYSCONF 32
FACILITY_RESERR 33
FACILITY_COMERR 34
FACILITY_RUNERR 35
FACILITY_XML 36
FACILITY_IPC 37
FACILITY_PDCE 38
FACILITY_COMREPLAY 39
FACILITY_SAL 40
FACILITY_TSD 41
FACILITY_WAP 42
FACILITY_REMOTESETUP 43
FACILITY_EXECMANAGER 44
FACILITY_CHARTENGINE 45
FACILITY_XMLLAUNCHERLIB 46
FACILITY_XMLDOMLIB 47
FACILITY_DOTNETLIB 48
FACILITY_RECORDERCONTROL 49
FACILITY_PMI 50
FACILITY_SILKVISION 51
FACILITY_DBREPLAY 52
FACILITY_PERFSERVLET 53
FACILITY_CUSTOM_API 54
FACILITY_ORACLE_FORMS 55
FACILITY_CITRIXENGINE 56
FACILITY_OCRLIB 57
FACILITY_SHUNRALOADMANAGER 58
FACILITY_SAPGUI 59
FACILITY_MAPI 60
FACILITY_COMPILER 61
FACILITY_GUILEVEL_TESTING_REPLAY 66
FACILITY_BROWSERENGINE 71
FACILITY_NATIVE_HTTP 1001
FACILITY_NATIVE_JAVA 1002
FACILITY_NATIVE_JOLT 1003
FACILITY_NATIVE_LDAP 1004
FACILITY_NATIVE_MEDIASTREAM 1005
FACILITY_NATIVE_OCI 1006
FACILITY_NATIVE_WAP 1007
FACILITY_NATIVE_REALSTREAM 1008
FACILITY_NATIVE_ATMI 1009
FACILITY_NATIVE_FML 1010