Closed 0x53A closed 6 years ago
Hi @0x53A, there is only one exception there (although it is an aggregate exception, so it contains one or more inner exceptions too), and the output is more or less what ToString() on the exception would generate.
Does this help?
Hi @adamchester, yes, the output is correct.
I didn't write it (I should have maybe elaborated a bit more instead of just posting a screenshot ;) ), but my intention was to propose to unwrap AggreagateExceptions.
This is really common and annoying with Task based tests from c#.
What do you think of https://github.com/haf/expecto/pull/270?
My preference is not to hide the fact that it’s wrapped in an aggregate exception, but I can understand the argument for cleaning it up a little.
I think this does simply for single exceptions. Will accept.
@adamchester for reference, the above screenshot was from this source code:
Runner.FocusedTestCase("focused async", async () => {
throw new IOException("Hello World!");
}),
the TPL automatically wraps everything into aggregate exceptions, which is slightly annoying.
:+1: