Web Application - RequestFailed Event

Fired whenever a request to a server routine fails

Member of Web Application (PRIM_WEB.Application)

Parameters

NameTypeData TypeDescription
Request*InputPRIM_WEB.ServerRequestReference to the request that failed
Reason*InputEnumerationReason code for the request failure
Handled*BothBooleanAllow the error to be handled in the routine or forwarded to the application

Details

The RequestFailed event is fired when the execution of a SrvRoutine fails.
 
By default the runtime will end and an error message will appear in the browser. However, by monitoring for the event and setting the Handled parameter to True, the default error handling processing can be overridden and an application can be coded to better handle a failure.
 
Individual request failures can also be detected using the Request Failed event.

Reasons

Enum ValueDescription
ServerErrorAn error occurred when executing the SrvRoutine. Check the joblog and x_err.log for further information
SessionInvalidThere is no valid session available on the server.
LicenseInvalidThe server license has expired

Example

In this example, when the event fired, the Handled is set to true and the applcation reports the error.
 
Despite the server failure, the client application will continue to execute.
Evtroutine Handling(#Sys_Web.RequestFailed) Reason(#Reason) Handled(#Handled) Request(#Request)
 
   #Handled := True
 
   #Com_owner.ReportError( #Reason #Request )
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2