Web Application - RequestFailed Event

Fired whenever a request to a server routine fails

Member of Web Application (PRIM_WEB.Application)

Parameters

Name

Type

Data Type

Description

Request

*Input

PRIM_WEB.ServerRequest

Reference to the request that failed

Reason

*Input

Enumeration

Reason code for the request failure

Handled

*Both

Boolean

Allow 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 Value

Description

ServerError

An error occurred when executing the SrvRoutine. Check the joblog and x_err.log for further information

SessionInvalid

There is no valid session available on the server.

LicenseInvalid

The server license has expired

Example

In this example, when the event is fired, the Handled is set to true and the application 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