-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UnreachableException is more correct (#4431)
- Loading branch information
1 parent
cc1acfd
commit 530bee3
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
src/Analyzers/MSTest.Analyzers/Helpers/ApplicationStateGuard.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}"); | ||
} |