Crédit Agricole Interview Question

How to write a custom Exception method?