No code is bug free or written to anticipate very possible scenario. The unexpected behavior may cause your application to stop working, corrupt data if it was in the process of updating multiple tables with the same values etc. Exception handling allows us to gracefully handle these unexpected behaviors. Exception handling is the process of responding to the occurrence, during computation, of exceptions – anomalous or exceptional events requiring special processing – often changing the normal flow of program execution. It is provided by specialized programming language constructs or computer hardware mechanisms. Below are the three (3) reasons why you should write exception handling code.
  1. Increased programming reliability – suppose you have an application that reads a file from the disk for processing, if the user selects a corrupt file or an invalid one, then an exception will be thrown. If you have an exception handling block, then you will be able to provide useful feedback to the users and provide them with an option to select a valid file
  2. Rollback incomplete transactions - exception handling is used to rollback transaction processing if an error occurs when executing SQL queries.
  3. Centralized error/exception processing – when an exception is thrown, you can have a dedicated exception handling class with a method that writes to the exception message to a log file for later analysis.
The diagram below shows how exceptions are handled c# exception handling For a practical tutorial on how to handle exceptions in C#, visit the URL below. Feel free to ask questions via the comments section if you are stuck with the practical tutorial or you would like some clarifications.

C# Exception Handling Practical Tutorial