In the MSDN and Intellisense info there is no mention of any Exception that is thrown when calling Queue.Enqueue
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