Wrapped Exception Function

Nov 24 2005 2:40 AM
Hi,

I am working on wrapping an exception over another.

I need a function to which i will be passing my friendly exception message and the exception object.
In that function i should be able to get the wrapped exception details and the parent exception details.

I am breaking my head with this for the past 2 days.

Help needed!!


private void button1_Click(object sender, System.EventArgs e)
   {
   try
   {
     try
     {
     
     int i = 7;
     int j = 0;

     int k = i/j;

     }
     catch (Exception ex)
     {
     //throw new Exception("The wrapped exception message",ex);    
         }
   }
   catch(Exception ex)
   {
     
     MessageBox.Show("Error in Demo function");
   }
   
   }

Answers (1)