Skip to content

Commit

Permalink
[xharness] Improve code to not throw exceptions in the first place in…
Browse files Browse the repository at this point in the history
…stead of catching and ignoring. (#9118)
  • Loading branch information
rolfbjarne authored and mandel-macaque committed Oct 5, 2020
1 parent a7187aa commit a2b822c
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,7 @@ public static void SetTopLevelPropertyGroupValue (this XmlDocument csproj, strin

public static void RemoveTargetFrameworkIdentifier (this XmlDocument csproj)
{
try {
RemoveNode (csproj, "TargetFrameworkIdentifier");
} catch {
// ignore exceptions, if not present, we are not worried
}
RemoveNode (csproj, "TargetFrameworkIdentifier", throwOnInexistentNode: false);
}

public static void SetAssemblyName (this XmlDocument csproj, string value)
Expand Down

0 comments on commit a2b822c

Please sign in to comment.