Handling exceptions
In the previous recipe, we created a list with a custom field and some data. If all of these calls are batched together and sent to the server, how do we handle exceptions? In this recipe, we will create a console application to see how to handle exceptions.
Getting ready
You should complete the previous recipe successfully to follow this one.
How to do it...
In order to handle exceptions, adhere to the following steps:
Launch your Visual Studio 2010 IDE as an administrator (right-click the shortcut and select Run as administrator).
Select File | New | Project. The new project wizard dialog box will be displayed (make sure to select .NET Framework 3.5 in the top drop-down box).
Select Windows console application under the Visual C# | Windows | Console Application node from Installed Templates section on the left-hand side.
Name the project HandleErrors and provide a directory location where you want to save the project and click on OK to create the console application template...