Example #1
0
        public override void OnError(Exception error)
        {
            if (error.IsRecoverableError())
            {
                Delegate.AckFailure();
            }
            else
            {
                HasUnrecoverableError = true;
            }

            if (error.IsConnectionError())
            {
                throw new ServiceUnavailableException(
                          $"Connection with the server breaks due to {error.GetType().Name}: {error.Message}", error);
            }
            else
            {
                throw error;
            }
        }