dotnet/msbuild

Refactor ExecuteInstantiatedTask exception handling

Open

#790 geöffnet am 19. Juli 2016

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (1 zugewiesene Person)C# (1.364 Forks)batch import
Area: Debuggabilityhelp wantedtriaged

Repository-Metriken

Stars
 (5.062 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 7h) (125 gemergte PRs in 30 T)

Beschreibung

There's a great deal of logic in ExecuteInstantiatedTask designed to handle exceptions thrown by tasks: https://github.com/Microsoft/msbuild/blob/4b30fac51ab58dadfffedb2a57e83b8398e3a5e1/src/XMakeBuildEngine/BackEnd/Components/RequestBuilder/TaskBuilder.cs#L720

Included in a lot of that logic is "rethrow wrapped to preserve stack", which was required in C# before C# 6. But now we have exception filters, which could simplify this logic and preserve stacks for free.

This is an important part of failure handling, so we'd need to make sure the right behavior from the existing logic is preserved.

Contributor Guide