コード例 #1
0
        protected override bool ShouldRetryOn(Exception exception)
        {
            if (_additionalErrorNumbers != null)
            {
                if (exception is MimerException)
                {
                    return(true);
                }
            }

            return(MySqlTransientExceptionDetector.ShouldRetryOn(exception));
        }
        protected override bool ShouldRetryOn(Exception exception)
        {
            if (AdditionalErrorNumbers != null)
            {
                if (exception is MySqlException sqlException)
                {
                    if (AdditionalErrorNumbers.Contains(((MySqlException)exception).Number))
                    {
                        return(true);
                    }
                }
            }

            return(MySqlTransientExceptionDetector.ShouldRetryOn(exception));
        }
        protected override bool ShouldRetryOn(Exception exception)
        {
            if (_additionalErrorNumbers != null)
            {
                var mySqlException = exception as MySqlException;
                if (mySqlException != null)
                {
                    if (_additionalErrorNumbers.Contains(mySqlException.Number))
                    {
                        return(true);
                    }
                }
            }

            return(MySqlTransientExceptionDetector.ShouldRetryOn(exception));
        }