Infosys interview question

Write a program for custom exception.