Error handling is an essential procedure in Visual Basic 2012 programming because it helps make a program error-free. Error-free code not only enables the programs to run smoothly and efficiently, it can also prevent all sorts of problems from happening like program crashes or system hangs.
Errors often occur due to incorrect input from the user. For example, the user might make the mistake of attempting to enter text (string) to a box that is designed to handle only numeric values such as the weight of a person, the computer will not be able to perform arithmetic calculation for text therefore will create an error. These errors are known as synchronous errors.
Therefore a good programmer should be more alert to the parts of program that could trigger errors and should write errors handling code to help the user in managing the errors. Writing errors handling code is a good practice for Visual Basic 2012 programmers, so do not try to finish a program fast by omitting the errors handling code. However, there should not be too many errors handling code in the program as it create problems for the programmer to maintain and troubleshoot the program later.
Read More by following the link below:
http://www.vbtutor.net/index.php/visual-basic-2012-lesson-20/