This is an artifact of a particular feature of NUnit,
which affects more than just ThrowsConstraint. So we should
discuss here and decide whether to change it only for
ThrowsConstraint or more generally.
NUnit distinguishes between unexpected exceptions - called
"Errors" - and assert failures - known as "Failures."
Sometimes the handling of the two is subtly different and
this is one case. For "Errors" the stack trace shows all
nested inner exceptions for "Failures" we only show the
trace up to the point of the test itself.
It seems to me that we could safely shoow nested exceptions
in both cases: for Assert failures, the inner exception
would normally be null. The main issue is how to tell
NUnit that there is an inner exception. The exception
is not generated by the constraint, but by the assertion
handling the failure. I suppose we could add an exception
field to the constraint, which would be queried by
Assert.That in order to use it as the inner exception
for the assertion exception.
For NUnit 3.0, I think we need a revision of how this
is handled. For NUnit 2.5.x, I'm willing to do it if
we can come up with a relatively simple approach.
Charlie