Wipro interview question

how to implement custom exception