/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/VisualStudio/IntegrationTest/TestSetup/TestExtensionErrorHandler.cs
28 строк
1 KB
Jason Malinowski
Remove workarounds for bugs that have been fixed
31 май 2025, 03:58
31 май 2025, 03:58
670cd85
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Composition; using Microsoft.CodeAnalysis.ErrorReporting; using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.VisualStudio.Text; namespace Microsoft.VisualStudio.IntegrationTest.Setup; /// <summary>This class causes a crash if an exception is encountered by the editor.</summary> [Shared, Export(typeof(IExtensionErrorHandler)), Export(typeof(TestExtensionErrorHandler))] public sealed class TestExtensionErrorHandler : IExtensionErrorHandler { [ImportingConstructor] [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] public TestExtensionErrorHandler() { } public void HandleError(object sender, Exception exception) { FatalError.ReportAndPropagate(exception); TestTraceListener.Instance.AddException(exception); } }