July 2015
Intermediate to advanced
1300 pages
87h 27m
English
In some situations you need to programmatically throw exceptions or you catch exceptions but do not want to handle them in the Catch block that intercepted exceptions. Programmatically throwing exceptions can be accomplished via the Throw keyword. For instance, the following line of code throws an ArgumentNullException that usually occurs when a method receives a null argument:
Throw New ArgumentNullException
You often need to manually throw exceptions when they should be handled by another portion of code, also in another application. A typical example is when you develop class libraries. A class library must be as abstract as possible, so you cannot decide which actions to take when an exception ...