Added Exception handling to the base controller