How to implement Try Catch in C