SetError (server-side)

Use this routine to save information about errors that occur in server-side code for display to the user. The error information is saved in the Active Server Pages (ASP) Session object, and used to automatically call the client-side routine ShowErrorDialog the next time the taskbar is displayed.

Definition

SetError(sErrorTitle,

         sFriendlyError,

         sErrorDetails,

         nErrorType)

Parameters

sErrorTitle

A string to be displayed in the title bar of the error dialog box.

sFriendlyError

A string containing a plain-language description of the error that has been encountered.

sErrorDetails

A string containing details about the error that has been encountered, often formatted as an HTML table using one of the error formatting routines: sGetASPError, sGetADOError, sGetScriptError, or sGetXMLError. This string can also be formatted using other methods.

nErrorType

A number that corresponds to the severity of the error, and which determines the type of icon displayed in the error dialog box. See Remarks for more information about constants provided for use as this parameter.

Return Value

None.

Remarks

The following constants are provided as the valid values for the nErrorType parameter:

ERROR_ICON_ALERT, ERROR_ICON_CRITICAL,

ERROR_ICON_INFORMATION, ERROR_ICON_QUESTION

If the error type is ERROR_ICON_ALERT or ERROR_ICON_CRITICAL, then the error is logged to the application event log.

This routine is available in the include file ASPUtil.asp.

See Also

Server-Side Routines

sGetADOError (server-side)

sGetASPError (server-side)

sGetErrorById (server-side)

sGetScriptError (server-side)

sGetXMLError (server-side)

Client-Side Routines

ShowXMLNodeErrors (client-side)


All rights reserved.