Exception handling changed

Exception handling changed