diff --git a/src/Analyzers/MSTest.Analyzers/Helpers/ApplicationStateGuard.cs b/src/Analyzers/MSTest.Analyzers/Helpers/ApplicationStateGuard.cs index 39acf92967..02826efc45 100644 --- a/src/Analyzers/MSTest.Analyzers/Helpers/ApplicationStateGuard.cs +++ b/src/Analyzers/MSTest.Analyzers/Helpers/ApplicationStateGuard.cs @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Diagnostics; using System.Runtime.CompilerServices; namespace MSTest.Analyzers.Helpers; internal static class ApplicationStateGuard { - public static InvalidOperationException Unreachable([CallerFilePath] string? path = null, [CallerLineNumber] int line = 0) + public static UnreachableException Unreachable([CallerFilePath] string? path = null, [CallerLineNumber] int line = 0) => new($"This program location is thought to be unreachable. File='{path}' Line={line}"); }