ExceptionExtensions
using System.Runtime.CompilerServices;
using System.Threading;
namespace System
{
internal static class ExceptionExtensions
{
[NullableContext(1)]
public static bool IsCriticalException(this Exception ex)
{
if (!(ex is NullReferenceException) && !(ex is StackOverflowException) && !(ex is OutOfMemoryException) && !(ex is ThreadAbortException) && !(ex is IndexOutOfRangeException) && !(ex is AccessViolationException))
return false;
return true;
}
}
}