Skip to content

Commit ee7ef76

Browse files
authored
Throw exception then TdhEnumerateProviders fails, which allows looking at the hr instead of causing an NRE which masks the exception. (#2177)
1 parent 3aa4ea9 commit ee7ef76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TraceEvent/TraceEventSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ internal static SortedDictionary<string, Guid> ProviderNameToGuid
17791779
}
17801780
else
17811781
{
1782-
Trace.WriteLine("TdhEnumerateProviders failed HR = " + hr);
1782+
throw new Exception("TdhEnumerateProviders failed HR = " + hr);
17831783
}
17841784
}
17851785
}

0 commit comments

Comments
 (0)