internal bool IsCriticalException(Type exceptionType) { if (typeof(Exception).IsAssignableFrom(exceptionType)) { return(CriticalExceptionTypes.Contains(exceptionType)); } else { throw new ArgumentException($"{exceptionType} is not exception!"); } }
internal bool IsCriticalException(Exception exception) { return(CriticalExceptionTypes.Contains(exception?.GetType())); }