IBM interview question

Exception handling program was asked to be written.