Write a program to handle an exception using try, catch and throw.

Write a program to handle an exception using try, catch and throw.