Exception Handling

There is an error in the program, These exceptions  needs to be handled in the code with out crashing or breaking the execution of code by using try, catch and finaly block. 
Syntax for exception handling is shown below

            try
            {
                //block of code that may raise an exception
            }
            catch(Exception ex)
            {
                //Catching and Handle exception
            }
            finally
            {
                // safe execution
            }

Popular Posts