How to try catch an exception

How to try catch an exception