Do you know if there is any option or extension for generating the code needed to detect all exceptions thrown by a method in Visual Studio?
For example, I call File.WriteAllBytes(...)
This method can throw 9 Exceptions: System.ArgumentException, System.ArgumentNullException, etc. etc.
I want code for all 9 exceptions:
catch (ArgumentException) { } catch (ArgumentNullException) { } ...
I saw this behavior in Eclipse for Java, but I am wondering if there is anything like this in Visual Studio.
BTW I am using Visual Studio 2012 Premium
source share