Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%CSP] >  [Error]
Private  Storage   

class %CSP.Error extends %CSP.ErrorLog

This error page will display information that is designed to make debugging an application easier, if you deploy a CSP application then you should use the %CSP.ErrorLog error page that logs the information or your own error that displays an error message suitable for an end user rather than providing them with a lot of debug information.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3


Summary

Methods
%ClassIsLatestVersion %ClassName %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Extends %GetParameter %IsA
%New %OriginalNamespace %PackageName %SetModified
ClassifyError ConvertParameter DecomposeError Decrypt
DisplayError Encrypt EscapeHTML EscapeURL
HyperEventCall HyperEventError HyperEventHead Include
InsertHiddenField InsertHiddenFields IsPrivate Link
LogError OnErrorSetup OnHTTPHeader OnPage
OnPageError OnPostHTTP OnPostHyperEvent OnPreHTTP
OnPreHyperEvent Page QuoteJS RewriteURL
ShowError StartTimer StopTimer ThrowError
UnescapeHTML UnescapeURL

Subclasses
%CSP.LogError %CSP.StudioTemplateError

Methods

• classmethod DisplayError(ByRef ErrorInfo As %String) as %Status
Output in HTML the error information in ErrorInfo which is the array provided by DecomposeError.
• classmethod HyperEventError()
If an error occurs while processing a HyperEvent then this method is called. This method will write out javascript code that will be executed on the browser. Note that the variable 'CSPPage' refers to the 'self' of the page on which the Hyperevent was called as this may be different to the current 'self'.

You could use this javascript to redirect the browser to another page:

	Write "CSPPage.window.location='/csp/samples/menu.csp';",!
Or you could popup an alert box with the error message in it:
	Write "alert('An error occurred');",!
• classmethod OnPage() as %Status
Output the error page as HTML. This makes use of the ##class(%CSP.Utils).DisplayAllObjects() call to display as much information as possible about the state of the %request, %response, %server objects when the error occurred.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.