Comment 5 for bug 957899

Revision history for this message
Chris Capon (ttabyss) wrote :

Here is an example:

   FileNotFoundException ex = new FileNotFoundException( "invalid path", "/path/to/nowhere" );
   Console.WriteLine( ex );
   Assert.DoesNotThrow( delegate { throw ex; }, "file test" );

The Console.Write displays:

   System.IO.FileNotFoundException: invalid path
   File name: '/path/to/nowhere'

The Assert.DoesNotThrow() displays:

   file test
   Unexpected exception: System.IO.FileNotFoundException

I think the details of the exception are important for debugging an application.