This project has moved. For the latest updates, please go here.

When can we expect the New Release?

Dec 10, 2009 at 1:39 PM

Hi,

I was very delighted when I found this exception handling class, but unfortunately I will not be able to use it until it supports multiple errors... 

I am hoping very much that you will release it very soon.

Ashi

Developer
Dec 10, 2009 at 10:17 PM

Ash

It does support multiple exceptions.

Here is the signature for ExceptionReporter.Show

     /// <summary>
        /// Show the ExceptionReport dialog
        /// </summary>
        /// <remarks>The <see cref="ExceptionReporter"/> will analyze the <see cref="Exception"/>s and
        /// create and show the report dialog.</remarks>
        /// <param name="exceptions">The <see cref="Exception"/>s to show.</param>
        public void Show(params Exception[] exceptions)

notice the exceptions parameter is an array

 

Dec 11, 2009 at 9:55 AM
Edited Dec 11, 2009 at 9:58 AM

Thanks for your reply... Do you mean we can pass the exceptions array? but its not working see below.
        Dim vExp_Report As New ExceptionReporting.ExceptionReporter
        Dim vExp1(1) As Exception

        Try
            Dim i As Int16 = "Test"
        Catch ex1 As Exception
            vExp1(0) = ex1
        End Try

        Try
            Dim i As Int16 = "99999999999999999999999999999"
        Catch ex2 As Exception
            vExp1(1) = ex2
        End Try
        vExp_Report.Show(vExp1)
Please give me one example so that i can understand it better. 
Thanks in Advance.

Coordinator
Jun 29, 2010 at 5:24 AM
Edited Jun 29, 2010 at 5:34 AM
There's a C# example in the Demo App (source code) It uses optional parameters.
private static void ShowMultipleExceptionReporter()
{
    Exception exception1 = null;
    Exception exception2 = null;
    try
    {
        SomeMethod();
    }
    catch (Exception exception)
    {
        exception1 = exception;
    }
    try
    {
        CallAnotherMethod();
    }
    catch (Exception exception)
    {
        exception2 = exception;
    }
    var exceptionReporter = new ExceptionReporter();

    exceptionReporter.ReadConfig();

    exceptionReporter.Show(exception1, exception2);
}