Brent, Thanks for the patch, looks like a good thing to do. I will apply it to CVS.
Many thanks, Nicko > -----Original Message----- > From: Matzelle, Brent [mailto:[EMAIL PROTECTED] > Sent: 01 September 2004 18:22 > To: [email protected] > Subject: Unmanaged code exception patch > > Hello Everyone, > > I attached a patch (diff.txt) to this message for a bug found > in src/ObjectRenderer/DefaultRenderer.cs in the > DefaultRenderer.RenderException method. The bug occurs when > an unamanged object throws an exception the Source property > throws an exception. This is a bug in C++ .NET in the .NET > Framework 1.1. > > Here is the snippet of code: > > ------------------------------------------------------------- > // If a C++ .NET exception was thrown from an unmanaged // > object then the Source property will throw an exception. > try > { > if (ex.Source != null && ex.Source.Length > 0) > { > writer.Write("Source: "); > writer.WriteLine(ex.Source); > } > } > catch > { > writer.WriteLine("Source: None (Exception occurred)"); } > ------------------------------------------------------------- > > The patch I've attached is built against Rev 1.3 in CVS so > you should be able to add it in very easily. > > Best regards, > > Brent. > > -- > Brent R. Matzelle > Senior Software Developer > Mobility Technologies > 610.407.7400 x2108 > >
