If one has the following code:
data.SaveChanges();
(data is an ObjectContext)
The MSDN doc has listed the OptimisticConcurrencyException as thrown. That's fine but I known that a UpdateException can also be thrown (and possibly others too). How can I know which exceptions a method can throw?
I do not want to catch Exception as I only want to catch exceptions which I know I can handle in some way.
This is generally speaking - not just for the example above. There must be some way of knowing which exception a 'built-in' .NET method is throwing.