|
|
Error
|
using System;
using GSF.ErrorManagement;
namespace WebApp
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string s = null;
s.ToCharArray(); // This will result in NullReferenceException.
}
catch (Exception ex)
{
ErrorModule.Logger.Log(ex); // Log the encountered exception.
}
}
}
}