Question: In the MSDN and Intellisense info there is no mention of any Exception that is thrown when calling [`Queue.Enqueue`](http://msdn.microsoft.com/en-us/library/system.collections.queue.enqueue%28v=vs.90%29.aspx) method

But since MSDN says 

> 
> .....As elements are added to a Queue, the capacity is automatically increased as required through reallocation
> 
> 
> 

I guess it can failed because there is not enough memory to hold the new element.

**What other errors can happen when callin `Queue.Enqueue` method ?** 
Maybe the answer could include a LINK to documentation that list all of them for this particular method

**How can I catch/handle the OutOfMemoryException when calling that method even though is not being thrown ?** (Even if I can not recover from the OutOfMemory error I want to log it)

And by "not being thrown" I mean that 

*In the documentation of any method it always mentions what exceptions can be thrown by that method, but for that particular method is either not documented or it does not throw any exception. I want to know which one it is*

Answer: 
Here is the disassembly of the Enqueue method (taken from ILSpy)

```
public void Enqueue(T item)
{
    if (this._size == this._array.Length)
    {
        int num = (int)((long)this._array.Length * 200L / 100L);
        if (num < this._array.Length + 4)
        {
            num = this._array.Length + 4;
        }
        this.SetCapacity(num);
    }
    this._array[this._tail] = item;
    this._tail = (this._tail + 1) % this._array.Length;
    this._size++;
    this._version++;
}

private void SetCapacity(int capacity)
{
    T[] array = new T[capacity];
    if (this._size > 0)
    {
        if (this._head < this._tail)
        {
            Array.Copy(this._array, this._head, array, 0, this._size);
        }
        else
        {
            Array.Copy(this._array, this._head, array, 0, this._array.Length - this._head);
            Array.Copy(this._array, 0, array, this._array.Length - this._head, this._tail);
        }
    }
    this._array = array;
    this._head = 0;
    this._tail = ((this._size == capacity) ? 0 : this._size);
    this._version++;
}

```

As you can see, it's pretty straightforward. You could get a [StackOverflowException](http://msdn.microsoft.com/en-us/library/system.stackoverflowexception%28v=vs.110%29.aspx), or an [OutOfMemoryException](http://msdn.microsoft.com/en-us/library/system.outofmemoryexception%28v=vs.110%29.aspx) because you can *always* potentially get these.

Apart from that, it's not clear that anything could go wrong. You'd need to verify that there was no possibility of a NullPointerException by validating the various checks and guard clauses in the rest of the code, but a cursory glance suggests it is likely this will not occur. Of course, if you start using reflection you could always force a NullPointerException to throw.

I don't know if this will help you, but I believe it answers the question you've asked.
Having seen your edit, the question makes a bit more sense.

The MSDN documentation does not ordinarily document that OutOfMemoryException can be thrown as, basically, any method call could throw it (any method that allocates memory anyway - which is pretty much all of them!). Therefore, you can assume that it can be thrown in this case.

---

To clarify the situation with catching exceptions, imagine this bit of code:

```
  try
  {
      throw new ArgumentNullException();
  }
  catch (ArgumentOutOfRangeException)
  { 
      // This can never happen, but is perfectly legal code.
  }

```

The catch block will never be entered, but the compiler is perfectly happy with this code - it won't even issue a warning.