Exemple #1
0
        private void OnError(string error)
        {
            OnCircuitError?.Invoke(error);

            var exception = FormatError?.Invoke(error) ?? new Exception(error);

            NextBatchReceived?.Completion?.TrySetException(exception);
            NextDotNetInteropCompletionReceived?.Completion.TrySetException(exception);
            NextJSInteropReceived?.Completion.TrySetException(exception);
            NextErrorReceived?.Completion?.TrySetResult(null);
        }
Exemple #2
0
        private void OnError(string error)
        {
            try
            {
                OnCircuitError?.Invoke(error);

                NextErrorReceived?.Completion?.TrySetResult(null);
            }
            catch (Exception e)
            {
                NextErrorReceived?.Completion?.TrySetResult(e);
            }
        }
Exemple #3
0
        private void OnError(string error)
        {
            Operations?.Errors.Enqueue(error);
            OnCircuitError?.Invoke(error);

            // If we get an error, forcibly terminate anything else we're waiting for. These
            // tests should only encounter errors in specific situations, and this ensures that
            // we fail with a good message.
            var exception = FormatError?.Invoke(error) ?? new Exception(error);

            NextBatchReceived?.Completion?.TrySetException(exception);
            NextDotNetInteropCompletionReceived?.Completion.TrySetException(exception);
            NextJSInteropReceived?.Completion.TrySetException(exception);
            NextErrorReceived?.Completion?.TrySetResult(null);
        }
Exemple #4
0
 private void OnError(Error error)
 {
     OnCircuitError?.Invoke(error);
 }