maoyuan121 / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Error on ErrorFiltering Wiki #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A code example in the Wiki for ErrorFiltering
(http://code.google.com/p/elmah/wiki/ErrorFiltering) appears to be incorrect.

The Filter() method accepts a ExceptionFilterEventArgs but the calls pass
an Exception.  The examples should be Filter(e) instead of
Filter(e.Exception) for the code to compile.

Thanks.

void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
{
    Filter(e.Exception);
}

void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
{
    Filter(e.Exception);
}

void Filter(ExceptionFilterEventArgs e)
{
    if (e.Exception.GetBaseException() is HttpRequestValidationException)
        e.Dismiss();
}

Original issue reported on code.google.com by jgs...@gmail.com on 23 Feb 2010 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 23 Feb 2010 at 6:25

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r712.

Original comment by azizatif on 23 Feb 2010 at 6:27