Cognizant Interview Question

How to define our own exception class