Exemple #1
0
        protected override bool ShouldRetryOn(Exception exception)
        {
            if (_additionalErrorNumbers != null)
            {
                if (SqlServerTransientExceptionDetector.IsHandled(exception, out var errorNumbers))
                {
                    foreach (var errNumber in errorNumbers)
                    {
                        if (_additionalErrorNumbers.Contains(errNumber))
                        {
                            return(true);
                        }
                    }
                }
            }

            return(SqlServerTransientExceptionDetector.ShouldRetryOn(exception));
        }
Exemple #2
0
        static bool IsMemoryOptimizedError(Exception exception)
        {
            if (SqlServerTransientExceptionDetector.IsHandled(exception, out var errorNumbers))
            {
                foreach (var errNumber in errorNumbers)
                {
                    switch (errNumber)
                    {
                    case 41301:
                    case 41302:
                    case 41305:
                    case 41325:
                    case 41839:
                        return(true);
                    }
                }
            }

            return(false);
        }