Add exception handling mechanism
Add exception handling mechanism