Sitecore 5.1.1 API

State.LastError Property

Gets a hash list of sections containing the last errors.

[Visual Basic]
Public Shared ReadOnly Property LastError As Hashtable
[C#]
public static System.Collections.Hashtable LastError {get;}

Property Value

A hash list of of errors.

Remarks

It is possible to log errors using this State variable. The key of the error identifies the type of error, e.g. "Extranet".

Example

The following example adds an error and retrieves it again.

  State.LastError.Add("Extranet", "Unknown user or password");
  string error = State.LastError["Extranet"];

See Also

State Class | Sitecore.Configuration Namespace