75 references to AsError
System.ServiceModel.Http (32)
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (4)
134
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.Format(SR.WebSocketInvalidProtocolNotInClientList, obtained, requested)));
259
throw FxTrace.Exception.
AsError
(new CommunicationException(SR.Format(SR.WebSocketVersionMismatchFromServer, ""), ex));
261
throw FxTrace.Exception.
AsError
(new CommunicationException(SR.Format(SR.WebSocketSubProtocolMismatchFromServer, ""), ex));
266
throw FxTrace.Exception.
AsError
(new CommunicationException(ex.Message, ex));
System\ServiceModel\Channels\HttpChannelFactory.cs (3)
526
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.Format(
538
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.Format(
1282
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.Format(
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (1)
50
throw Fx.Exception.
AsError
(new InvalidOperationException(SR.OnlyDefaultSpnServiceSupported));
System\ServiceModel\Channels\WebSocketHelper.cs (4)
165
return FxTrace.Exception.
AsError
(communicationException);
170
return FxTrace.Exception.
AsError
(ex);
196
throw FxTrace.Exception.
AsError
(GetTimeoutException(null, timeout, operation));
209
throw FxTrace.Exception.
AsError
(GetTimeoutException(null, timeout, operation));
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (18)
130
throw Fx.Exception.
AsError
(new TimeoutException(InternalSR.TaskTimedOutError(timeout)));
332
throw FxTrace.Exception.
AsError
(exceptionToThrow);
507
throw FxTrace.Exception.
AsError
(new TimeoutException(
564
_pendingException = FxTrace.Exception.
AsError
(new QuotaExceededException(SR.Format(SR.MaxReceivedMessageSizeExceeded, _maxBufferSize)));
701
throw FxTrace.Exception.
AsError
(new InvalidOperationException());
933
get { throw FxTrace.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported)); }
940
throw FxTrace.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported));
945
throw FxTrace.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported));
996
throw FxTrace.Exception.
AsError
(WebSocketHelper.GetTimeoutException(null,
1043
throw Fx.Exception.
AsError
(new TimeoutException(InternalSR.TaskTimedOutError(new TimeSpan(ReadTimeout))));
1075
throw FxTrace.Exception.
AsError
(new NotSupportedException("this method should never get called"));
1080
throw FxTrace.Exception.
AsError
(new NotSupportedException());
1085
throw FxTrace.Exception.
AsError
(new NotSupportedException());
1092
throw FxTrace.Exception.
AsError
(new NotSupportedException("this method should never get called"));
1099
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.WebSocketStreamWriteCalledAfterEOMSent));
1123
throw Fx.Exception.
AsError
(new TimeoutException(InternalSR.TaskTimedOutError(new TimeSpan(WriteTimeout))));
1197
throw Fx.Exception.
AsError
(
1215
throw FxTrace.Exception.
AsError
(new ProtocolException(SR.WebSocketUnexpectedCloseMessageError));
System\ServiceModel\NetHttpBinding.cs (1)
98
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
System\ServiceModel\NetHttpsBinding.cs (1)
90
throw FxTrace.Exception.
AsError
(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
System.ServiceModel.Primitives (43)
Internals\System\Runtime\ActionItem.cs (2)
56
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
67
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
Internals\System\Runtime\AsyncResult.cs (8)
94
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType())));
156
throw Fx.Exception.
AsError
(new CallbackException(InternalSR.AsyncCallbackThrewException, e));
171
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.InvalidNullAsyncResult));
268
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.InvalidNullAsyncResult));
301
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType())));
313
throw Fx.Exception.
AsError
(new InvalidOperationException(message));
334
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded));
352
ExceptionDispatchInfo.Capture(Fx.Exception.
AsError
(asyncResult._exception)).Throw();
Internals\System\Runtime\BufferedOutputStream.cs (11)
83
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported));
87
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported));
139
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.ReadNotSupported));
144
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.ReadNotSupported));
186
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.ReadNotSupported));
191
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.ReadNotSupported));
196
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported));
201
throw Fx.Exception.
AsError
(new NotSupportedException(InternalSR.SeekNotSupported));
269
throw Fx.Exception.
AsError
(CreateQuotaExceededException(_maxSizeQuota));
275
throw Fx.Exception.
AsError
(CreateQuotaExceededException(_maxSizeQuota));
309
throw Fx.Exception.
AsError
(CreateQuotaExceededException(_maxSize));
Internals\System\Runtime\ExceptionTrace.cs (1)
113
return
AsError
(targetInvocationException.InnerException);
Internals\System\Runtime\Fx.cs (2)
366
throw Exception.
AsError
(
381
throw Fx.Exception.
AsError
(
Internals\System\Runtime\InputQueue.cs (5)
147
throw Fx.Exception.
AsError
(new TimeoutException(InternalSR.TimeoutInputQueueDequeue(timeout)));
159
throw Fx.Exception.
AsError
(new TimeoutException(InternalSR.TimeoutInputQueueDequeue(timeout)));
347
throw Fx.Exception.
AsError
(new TimeoutException());
884
throw Fx.Exception.
AsError
(Exception);
1136
throw Fx.Exception.
AsError
(_exception);
Internals\System\Runtime\SignalGate.cs (1)
86
throw Fx.Exception.
AsError
(new InvalidOperationException(InternalSR.InvalidSemaphoreExit));
Internals\System\Runtime\TaskHelpers.cs (1)
345
throw Fx.Exception.
AsError
(new TimeoutException(InternalSR.TaskTimedOutError(timeout)));
System\IdentityModel\Selectors\SecurityTokenProvider.cs (2)
65
throw Fx.Exception.
AsError
(new SecurityTokenException(SRP.Format(SRP.TokenProviderUnableToGetToken, this)));
150
throw Fx.Exception.
AsError
(new SecurityTokenException(SRP.Format(SRP.TokenProviderUnableToRenewToken, this)));
System\IdentityModel\Tokens\SecurityKeyType.cs (1)
31
throw Fx.Exception.
AsError
(new InvalidEnumArgumentException("value", (int)value,
System\IdentityModel\Tokens\SecurityKeyUsage.cs (1)
29
throw Fx.Exception.
AsError
(new InvalidEnumArgumentException("value", (int)value,
System\ServiceModel\Channels\BinaryMessageEncoder.cs (2)
830
throw FxTrace.Exception.
AsError
(new ProtocolException(SRP.Format(SRP.EncoderUnrecognizedContentType, contentType, ContentType)));
849
throw FxTrace.Exception.
AsError
(new ProtocolException(SRP.Format(SRP.EncoderUnrecognizedContentType, contentType, ContentType)));
System\ServiceModel\Channels\BinaryMessageEncodingBindingElement.cs (1)
161
throw FxTrace.Exception.
AsError
(new NotSupportedException(SRP.Format(
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
107
throw FxTrace.Exception.
AsError
(new TaskCanceledException(task));
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (4)
286
throw FxTrace.Exception.
AsError
(new MessageSecurityException(ex.Message));
303
throw FxTrace.Exception.
AsError
(new MessageSecurityException(ex.Message));
320
throw FxTrace.Exception.
AsError
(new MessageSecurityException(ex.Message));
337
throw FxTrace.Exception.
AsError
(new MessageSecurityException(ex.Message));