67 references to AsError
System.ServiceModel.Internals (67)
System\Runtime\ActionItem.cs (3)
75throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 104throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 118throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
System\Runtime\AsyncEventArgs.cs (2)
40throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletionPending(GetType()))); 53throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletedTwice(GetType())));
System\Runtime\AsyncResult.cs (8)
125throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 196throw Fx.Exception.AsError(new CallbackException(InternalSR.AsyncCallbackThrewException, e)); 212throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 309throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 342throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType()))); 354throw Fx.Exception.AsError(new InvalidOperationException(message)); 375throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded)); 406throw Fx.Exception.AsError(asyncResult.exception);
System\Runtime\AsyncWaitHandle.cs (1)
263throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.MustCancelOldTimer));
System\Runtime\BufferedOutputStream.cs (11)
84throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 88throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 140throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 145throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 187throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 192throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 197throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 202throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 270throw Fx.Exception.AsError(CreateQuotaExceededException(this.maxSizeQuota)); 276throw Fx.Exception.AsError(CreateQuotaExceededException(this.maxSizeQuota)); 310throw Fx.Exception.AsError(CreateQuotaExceededException(this.maxSize));
System\Runtime\Collections\NullableKeyDictionary.cs (7)
60throw Fx.Exception.AsError(new KeyNotFoundException()); 250throw Fx.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed)); 255throw Fx.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed)); 274throw Fx.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed)); 325throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed)); 330throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed)); 350throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed));
System\Runtime\Collections\OrderedDictionary.cs (2)
67throw Fx.Exception.AsError(new KeyNotFoundException(InternalSR.KeyNotFoundInDictionary)); 170throw Fx.Exception.AsError(new ArgumentOutOfRangeException("arrayIndex"));
System\Runtime\Diagnostics\DiagnosticEventProvider.cs (5)
399throw Fx.Exception.AsError(new ArgumentNullException("eventMessage")); 527throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 566throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 754throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 793throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload",
System\Runtime\ExceptionTrace.cs (1)
57return AsError(targetInvocationException.InnerException);
System\Runtime\Fx.cs (2)
461throw Fx.Exception.AsError( 476throw Fx.Exception.AsError(
System\Runtime\InputQueue.cs (4)
153throw Fx.Exception.AsError(new TimeoutException(InternalSR.TimeoutInputQueueDequeue(timeout))); 292throw Fx.Exception.AsError(new TimeoutException()); 788throw Fx.Exception.AsError(this.exception); 1065throw Fx.Exception.AsError(this.exception);
System\Runtime\Interop\UnsafeNativeMethods.cs (2)
111throw Fx.Exception.AsError(new System.ComponentModel.Win32Exception(error)); 124throw Fx.Exception.AsError(new System.ComponentModel.Win32Exception(error));
System\Runtime\IOThreadTimer.cs (2)
637throw Fx.Exception.AsError(exception); 645throw Fx.Exception.AsError(new Win32Exception());
System\Runtime\ReadOnlyDictionaryInternal.cs (6)
50throw Fx.Exception.AsError(CreateReadOnlyException()); 73throw Fx.Exception.AsError(CreateReadOnlyException()); 78throw Fx.Exception.AsError(CreateReadOnlyException()); 83throw Fx.Exception.AsError(CreateReadOnlyException()); 112throw Fx.Exception.AsError(CreateReadOnlyException()); 117throw Fx.Exception.AsError(CreateReadOnlyException());
System\Runtime\SignalGate.cs (1)
86throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidSemaphoreExit));
System\Runtime\TaskExtensions.cs (3)
22throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.SFxTaskNotStarted)); 64throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.SFxTaskNotStarted)); 187throw Fx.Exception.AsError(new TimeoutException(InternalSR.TaskTimedOutError(timeout)));
System\Runtime\ThreadNeutralSemaphore.cs (5)
82throw Fx.Exception.AsError(CreateObjectAbortedException()); 143throw Fx.Exception.AsError(CreateEnterTimedOutException(timeout)); 158throw Fx.Exception.AsError(CreateObjectAbortedException()); 225throw Fx.Exception.AsError(CreateObjectAbortedException()); 266throw Fx.Exception.AsError(new SynchronizationLockException(message));
System\Runtime\TypeHelper.cs (2)
111throw Fx.Exception.AsError(new InvalidCastException(InternalSR.CannotConvertObject(source, typeof(T)))); 123throw Fx.Exception.AsError(new InvalidCastException(InternalSR.CannotConvertObject(source, typeof(T))));