Rediger

Del via


WmlPageAdapter.HandleError(Exception, HtmlTextWriter) Method

Definition

Called if an unhandled exception occurs during the life cycle of the page. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 virtual bool HandleError(Exception ^ e, System::Web::UI::HtmlTextWriter ^ writer);
public virtual bool HandleError (Exception e, System.Web.UI.HtmlTextWriter writer);
abstract member HandleError : Exception * System.Web.UI.HtmlTextWriter -> bool
override this.HandleError : Exception * System.Web.UI.HtmlTextWriter -> bool
Public Overridable Function HandleError (e As Exception, writer As HtmlTextWriter) As Boolean

Parameters

e
Exception

System exception object.

writer
HtmlTextWriter

The text writer.

Returns

true in all cases.

Implements

Remarks

An adapter can choose to handle the exception and render an error message. The method returns true if it handles the error.

For the HtmlPageAdapter class, this implementation does nothing and returns false.

For the WmlPageAdapter class, this implementation formats the error for WML and returns true.

Applies to

See also