How to write custom exception class in net